summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-13 15:40:31 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-13 15:40:31 +0100
commit19d9435a32ffac1f6fe35b8e5a68f2036d8aec27 (patch)
treef8b71068412fb329ebe1927980596816288664c0 /bitbake/lib
parent89c72609311c18045e47822649fbcc25099e4860 (diff)
downloadopenembedded-core-19d9435a32ffac1f6fe35b8e5a68f2036d8aec27.tar.gz
openembedded-core-19d9435a32ffac1f6fe35b8e5a68f2036d8aec27.tar.bz2
openembedded-core-19d9435a32ffac1f6fe35b8e5a68f2036d8aec27.tar.xz
openembedded-core-19d9435a32ffac1f6fe35b8e5a68f2036d8aec27.zip
bitbake/siggen: Allow generation of siggen data from task context
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/siggen.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 949ad4e27..ef14471b6 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -109,10 +109,13 @@ class SignatureGeneratorBasic(SignatureGenerator):
def dump_sigtask(self, fn, task, stampbase, runtime):
k = fn + "." + task
- if runtime:
+ if runtime == "customfile":
+ sigfile = stampbase
+ elif runtime:
sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k]
else:
sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[k]
+
data = {}
data['basewhitelist'] = self.basewhitelist
data['taskwhitelist'] = self.taskwhitelist
@@ -125,7 +128,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
data['gendeps'][dep] = self.gendeps[fn][dep]
data['varvals'][dep] = self.lookupcache[fn][dep]
- if runtime:
+ if runtime and runtime != "customfile":
data['runtaskdeps'] = self.runtaskdeps[k]
data['runtaskhashes'] = {}
for dep in data['runtaskdeps']:
@@ -145,6 +148,11 @@ class SignatureGeneratorBasic(SignatureGenerator):
bb.error("The mismatched hashes were %s and %s" % (dataCache.basetaskhash[k], self.basehash[k]))
self.dump_sigtask(fn, task, dataCache.stamp[fn], True)
+def dump_this_task(outfile, d):
+ fn = d.getVar("BB_FILENAME", True)
+ task = "do_" + d.getVar("BB_CURRENTTASK", True)
+ bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
+
def compare_sigfiles(a, b):
p1 = pickle.Unpickler(file(a, "rb"))
a_data = p1.load()