summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-28 13:34:33 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-07 17:25:55 (GMT)
commitad4e3ee74c7baaeb0d4916f71f0a6572d2936c1e (patch)
treee2176c3fae972f065275723a57d79eb8f92ecefd
parentcbec839886afa3352f9417c970f7a63c69f28e3f (diff)
downloadpoky-ad4e3ee74c7baaeb0d4916f71f0a6572d2936c1e.tar.gz
bitbake: build/siggen.py: Avoid removing too many stamps when cleaning
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] (Bitbake rev: f31d930e9b2aa483aa30f6e7f7ec9b9f1321e3a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/build.py10
-rw-r--r--bitbake/lib/bb/siggen.py3
2 files changed, 7 insertions, 6 deletions
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):
491 extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or "" 491 extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or ""
492 492
493 if not stamp: 493 if not stamp:
494 return 494 return []
495
496 cleanmask = bb.parse.siggen.stampcleanmask(stamp, file_name, taskname, extrainfo)
495 497
496 return bb.parse.siggen.stampcleanmask(stamp, file_name, taskname, extrainfo) 498 return [cleanmask, cleanmask.replace(taskflagname, taskflagname + "_setscene")]
497 499
498def make_stamp(task, d, file_name = None): 500def make_stamp(task, d, file_name = None):
499 """ 501 """
@@ -501,8 +503,8 @@ def make_stamp(task, d, file_name = None):
501 (d can be a data dict or dataCache) 503 (d can be a data dict or dataCache)
502 """ 504 """
503 cleanmask = stamp_cleanmask_internal(task, d, file_name) 505 cleanmask = stamp_cleanmask_internal(task, d, file_name)
504 if cleanmask: 506 for mask in cleanmask:
505 bb.utils.remove(cleanmask) 507 bb.utils.remove(mask)
506 508
507 stamp = stamp_internal(task, d, file_name) 509 stamp = stamp_internal(task, d, file_name)
508 # Remove the file and recreate to force timestamp 510 # 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):
49 return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.') 49 return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
50 50
51 def stampcleanmask(self, stampbase, file_name, taskname, extrainfo): 51 def stampcleanmask(self, stampbase, file_name, taskname, extrainfo):
52 return ("%s.%s*.%s" % (stampbase, taskname, extrainfo)).rstrip('.') 52 return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
53 53
54 def dump_sigtask(self, fn, task, stampbase, runtime): 54 def dump_sigtask(self, fn, task, stampbase, runtime):
55 return 55 return
@@ -276,7 +276,6 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
276 k = fn + "." + taskname 276 k = fn + "." + taskname
277 if clean: 277 if clean:
278 h = "*" 278 h = "*"
279 taskname = taskname + "*"
280 elif k in self.taskhash: 279 elif k in self.taskhash:
281 h = self.taskhash[k] 280 h = self.taskhash[k]
282 else: 281 else: