diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-27 11:05:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-27 11:10:57 +0000 |
commit | e8e9f56057f3732d2550375a23573ab7231eac22 (patch) | |
tree | cea9c90633cf00c59f24dcc980a35ef9afc3aff3 /meta/classes | |
parent | 7476df3fa2cf52cde6785e4fb4e4f59e6a525047 (diff) | |
download | openembedded-core-e8e9f56057f3732d2550375a23573ab7231eac22.tar.gz openembedded-core-e8e9f56057f3732d2550375a23573ab7231eac22.tar.bz2 openembedded-core-e8e9f56057f3732d2550375a23573ab7231eac22.zip |
rm_work.bbclass: Update to convert stamps to setscene stamps
We need to manipulate the stamps when removing WORKDIR to indicte that
tasks like compile or install can't just rerun. The most effective method
to do this is to convert the layout to match that which would have been the
case had the system been build from sstate packages.
For example, we'd task stamps like:
xxx-1.4.7-r3.do_compile
xxx-1.4.7-r3.do_configure
xxx-1.4.7-r3.do_fetch
xxx-1.4.7-r3.do_generate_toolchain_file
xxx-1.4.7-r3.do_install
xxx-1.4.7-r3.do_package.emenlow
xxx-1.4.7-r3.do_package_write
xxx-1.4.7-r3.do_package_write_ipk
xxx-1.4.7-r3.do_package_write_rpm
xxx-1.4.7-r3.do_patch
xxx-1.4.7-r3.do_populate_sysroot.emenlow
xxx-1.4.7-r3.do_setscene
xxx-1.4.7-r3.do_unpack
and after rm_work, we'd have stamps of:
xxx-1.4.7-r3.do_package_setscene.emenlow
xxx-1.4.7-r3.do_package_write_ipk_setscene
xxx-1.4.7-r3.do_package_write_rpm_setscene
xxx-1.4.7-r3.do_populate_sysroot_setscene.emenlow
We also need to handle stamps in the form xxx-1.4.7-r3.do_package.MACHINE.TASKHASH
as used by some signature generators.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/rm_work.bbclass | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass index 260ecb0d8f..501583cdc9 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass @@ -26,6 +26,31 @@ do_rm_work () { # Need to add pseudo back or subsqeuent work in this workdir # might fail since setscene may not rerun to recreate it mkdir ${WORKDIR}/pseudo/ + + # Change normal stamps into setscene stamps as they better reflect the + # fact WORKDIR is now empty + cd `dirname ${STAMP}` + for i in `basename ${STAMP}`* + do + for j in ${SSTATETASKS} + do + case $i in + *do_setscene*) + break + ;; + *_setscene*) + i=dummy + break + ;; + *$j|*$j.*) + mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` + i=dummy + break + ;; + esac + done + rm -f $i + done } addtask rm_work after do_${RMWORK_ORIG_TASK} |