[poky] [PATCH 2/3] rm_work.bbclass: handle stamp files while doing rm_work
Dongxiao Xu
dongxiao.xu at intel.com
Thu Jan 27 00:04:31 PST 2011
From: Dongxiao Xu <dongxiao.xu at intel.com>
If rm_work is scheduled, we need to remove the stamps of fetch, unpack,
patch, etc, while just leaving the setscene varients.
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 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
This can solve the issue we meet if we force to schedule a task after
contents in ${WORKDIR} are removed.
Also this can solve the rm_work issue we met after machine specific
sysroot is implemented.
Thanks for Richard's suggestion to tracking these issues down.
Signed-off-by: Dongxiao Xu <dongxiao.xu at intel.com>
---
meta/classes/rm_work.bbclass | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 260ecb0..a151f4c 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -26,6 +26,23 @@ 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/
+
+ rm -rf `ls ${STAMP}* | grep -v sigdata | grep -v do_populate_sysroot | grep -v do_package` ${STAMP}.do_package_write
+
+ for stamp in `ls ${STAMP}* | grep do_package_write_* | grep -v setscene`
+ do
+ mv $stamp $stamp\_setscene
+ done
+
+ for task in do_populate_sysroot do_package
+ do
+ if [ -e ${STAMP}.$task ]; then
+ mv ${STAMP}.$task ${STAMP}.$task\_setscene
+ elif [ -e ${STAMP}.$task.${MACHINE} ]; then
+ mv ${STAMP}.$task.${MACHINE} ${STAMP}.$task\_setscene.${MACHINE}
+ fi
+ done
+
}
addtask rm_work after do_${RMWORK_ORIG_TASK}
--
1.6.3.3
More information about the poky
mailing list