All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongxiao Xu <dongxiao.xu@intel.com>
To: poky@yoctoproject.org
Subject: [PATCH 2/3] rm_work.bbclass: handle stamp files while doing rm_work
Date: Thu, 27 Jan 2011 16:04:31 +0800	[thread overview]
Message-ID: <7a0a83046957272a5575afafe615a47c57eb5b85.1296115229.git.dongxiao.xu@intel.com> (raw)
In-Reply-To: <cover.1296115229.git.dongxiao.xu@intel.com>

From: Dongxiao Xu <dongxiao.xu@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@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



  parent reply	other threads:[~2011-01-27  7:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27  8:04 [PATCH 0/3][PULL] several machine specific sysroots fixes Dongxiao Xu
2011-01-27  8:04 ` [PATCH 1/3] bitbake: add ${MACHINE} for do_populate_sysroot_setscene and do_package_setscene Dongxiao Xu
2011-01-27 11:24   ` Richard Purdie
2011-01-28  7:54     ` Xu, Dongxiao
2011-01-27  8:04 ` Dongxiao Xu [this message]
2011-01-27 11:13   ` [PATCH 2/3] rm_work.bbclass: handle stamp files while doing rm_work Richard Purdie
2011-01-28  7:52     ` Xu, Dongxiao
2011-01-27  8:04 ` [PATCH 3/3] perl: Remove ${MACHINE} dependency in compile and package Dongxiao Xu
2011-01-27 11:26   ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a0a83046957272a5575afafe615a47c57eb5b85.1296115229.git.dongxiao.xu@intel.com \
    --to=dongxiao.xu@intel.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.