All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build/siggen.py: Avoid removing too many stamps when cleaning
@ 2012-11-28 13:50 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-11-28 13:50 UTC (permalink / raw)
  To: bitbake-devel

The "*" part of the mask is to ensure we clean both any stamp, and any
setscene varient. It turns out we would also trample other tasks,
e.g. do_package_write could trample do_package_write_rpm. do_package also
tramples do_package_write_* but this is less of an issue since the other
tasks depend on it.

Rather than use the wildcard, we can just use a list instead.

[YOCTO #3484]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 85af42c..8ff7fb2 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -491,9 +491,11 @@ def stamp_cleanmask_internal(taskname, d, file_name):
         extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or ""
 
     if not stamp:
-        return
+        return []
+
+    cleanmask = bb.parse.siggen.stampcleanmask(stamp, file_name, taskname, extrainfo)
 
-    return bb.parse.siggen.stampcleanmask(stamp, file_name, taskname, extrainfo)
+    return [cleanmask, cleanmask.replace(taskflagname, taskflagname + "_setscene")]
 
 def make_stamp(task, d, file_name = None):
     """
@@ -501,8 +503,8 @@ def make_stamp(task, d, file_name = None):
     (d can be a data dict or dataCache)
     """
     cleanmask = stamp_cleanmask_internal(task, d, file_name)
-    if cleanmask:
-        bb.utils.remove(cleanmask)
+    for mask in cleanmask:
+        bb.utils.remove(mask)
 
     stamp = stamp_internal(task, d, file_name)
     # Remove the file and recreate to force timestamp
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index ff70d4f..ba14940 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -49,7 +49,7 @@ class SignatureGenerator(object):
         return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
 
     def stampcleanmask(self, stampbase, file_name, taskname, extrainfo):
-        return ("%s.%s*.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
+        return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
 
     def dump_sigtask(self, fn, task, stampbase, runtime):
         return
@@ -276,7 +276,6 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
             k = fn + "." + taskname
         if clean:
             h = "*"
-            taskname = taskname + "*"
         elif k in self.taskhash:
             h = self.taskhash[k]
         else:





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-28 14:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 13:50 [PATCH] build/siggen.py: Avoid removing too many stamps when cleaning Richard Purdie

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.