diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-28 13:34:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-28 14:14:07 +0000 |
commit | 9de050111b9ae323dcdbb666939afbf898f67de1 (patch) | |
tree | 92c7d67fbe423a3a6b933b435846bec838752d27 /bitbake/lib | |
parent | 4493b107a7f0f9b4f441f661c16176157d950245 (diff) | |
download | poky-9de050111b9ae323dcdbb666939afbf898f67de1.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: c14d831ea3f625e9a47266a0c4e6deefc924ca5a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 10 | ||||
-rw-r--r-- | bitbake/lib/bb/siggen.py | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 85af42c684..8ff7fb2931 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 | ||
498 | def make_stamp(task, d, file_name = None): | 500 | def 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 ff70d4ff4f..ba149402bf 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: |