Files
poky/meta/classes/rm_work.bbclass
Richard Purdie 99c0cbd6d6 rm_work: Fix interaction issues with pseudo
This class needs to wipe out the contents of the pseudo database but also
ensure the pseudo directory exists for any subsequent tasks and also ensure
any pseudo server has shut down before removing the database. This patch
does all of these things.

[BUGID #222]

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-12 15:52:07 +01:00

35 lines
756 B
Plaintext

#
# Removes source after build
#
# To use it add that line to conf/local.conf:
#
# INHERIT += "rm_work"
#
RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
BB_DEFAULT_TASK = "rm_work_all"
do_rm_work () {
# Ensure pseudo is no longer active
${FAKEROOT} -S
cd ${WORKDIR}
for dir in *
do
if [ `basename ${S}` = $dir ]; then
rm -rf $dir
elif [ $dir != 'temp' ]; then
rm -rf $dir
fi
done
# Need to add pseudo back or subsqeuent work in this workdir
# might fail since setscene may not rerun to recreate it
mkdir ${WORKDIR}/pseudo/
}
addtask rm_work after do_${RMWORK_ORIG_TASK}
do_rm_work_all () {
:
}
do_rm_work_all[recrdeptask] = "do_rm_work"
addtask rm_work_all after do_rm_work