Patchwork [bitbake-devel,3/3], Invalidate setscene tasks based on do_unpack stamps

mail settings
Submitter Jason Wessel
Date June 14, 2012, 3:16 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/29811/
State New
Headers show


Jason Wessel - June 14, 2012, 3:16 a.m.
If you have a fully populated sstate cache and have used it to
execute a build, it is not possible to invalidate repackage
an intermediate build after you have forced a compiled

Example when you have build from a complete sstate cache build:
  bitbake core-image-sato
  bitbake -c patch acl
     *** Make some changes to the C files for experimentation.
  bitbake -f -c compile acl
  bitbake acl

The bitbake will refuse to build the acl package at this
point and instead keep populating it from the sstate.  Using
the cleanstate is no longer a good option because it will
also erase the scratch area.

Signed-off-by: Jason Wessel <>
 lib/bb/    |    8 ++++++++
 lib/bb/ |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)


diff --git a/lib/bb/ b/lib/bb/
index 055d382..9d78764 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -499,6 +499,14 @@  def del_stamp(task, d, file_name = None):
     stamp = stamp_internal(task, d, file_name)
+def exists_stamp(task, d, file_name = None):
+    """
+    Removes a stamp for a given task
+    (d can be a data dict or dataCache)
+    """
+    stamp = stamp_internal(task, d, file_name)
+    return os.path.exists(stamp)
 def stampfile(taskname, d, file_name = None):
     Return the stamp for a given task
diff --git a/lib/bb/ b/lib/bb/
index f1fabfa..93d36c9 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -730,7 +730,7 @@  class RunQueueData:
             for task in self.runq_setscene:
                     fn = self.taskData.fn_index[self.rq.rqdata.runq_fnid[task]]
-                    if (self.cooker.configuration.invalidate_stamp and fn in test_fns):
+                    if"do_unpack", self.dataCache, fn) or (self.cooker.configuration.invalidate_stamp and fn in test_fns):
                         logger.debug(2, 'Removing task %s due to invalidated build stamps', task)