summaryrefslogtreecommitdiffstats
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)
downloadpoky-19d9435a32ffac1f6fe35b8e5a68f2036d8aec27.tar.gz
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 949ad4e27f..ef14471b66 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -109,10 +109,13 @@ class SignatureGeneratorBasic(SignatureGenerator):
109 109
110 def dump_sigtask(self, fn, task, stampbase, runtime): 110 def dump_sigtask(self, fn, task, stampbase, runtime):
111 k = fn + "." + task 111 k = fn + "." + task
112 if runtime: 112 if runtime == "customfile":
113 sigfile = stampbase
114 elif runtime:
113 sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k] 115 sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k]
114 else: 116 else:
115 sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[k] 117 sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[k]
118
116 data = {} 119 data = {}
117 data['basewhitelist'] = self.basewhitelist 120 data['basewhitelist'] = self.basewhitelist
118 data['taskwhitelist'] = self.taskwhitelist 121 data['taskwhitelist'] = self.taskwhitelist
@@ -125,7 +128,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
125 data['gendeps'][dep] = self.gendeps[fn][dep] 128 data['gendeps'][dep] = self.gendeps[fn][dep]
126 data['varvals'][dep] = self.lookupcache[fn][dep] 129 data['varvals'][dep] = self.lookupcache[fn][dep]
127 130
128 if runtime: 131 if runtime and runtime != "customfile":
129 data['runtaskdeps'] = self.runtaskdeps[k] 132 data['runtaskdeps'] = self.runtaskdeps[k]
130 data['runtaskhashes'] = {} 133 data['runtaskhashes'] = {}
131 for dep in data['runtaskdeps']: 134 for dep in data['runtaskdeps']:
@@ -145,6 +148,11 @@ class SignatureGeneratorBasic(SignatureGenerator):
145 bb.error("The mismatched hashes were %s and %s" % (dataCache.basetaskhash[k], self.basehash[k])) 148 bb.error("The mismatched hashes were %s and %s" % (dataCache.basetaskhash[k], self.basehash[k]))
146 self.dump_sigtask(fn, task, dataCache.stamp[fn], True) 149 self.dump_sigtask(fn, task, dataCache.stamp[fn], True)
147 150
151def dump_this_task(outfile, d):
152 fn = d.getVar("BB_FILENAME", True)
153 task = "do_" + d.getVar("BB_CURRENTTASK", True)
154 bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
155
148def compare_sigfiles(a, b): 156def compare_sigfiles(a, b):
149 p1 = pickle.Unpickler(file(a, "rb")) 157 p1 = pickle.Unpickler(file(a, "rb"))
150 a_data = p1.load() 158 a_data = p1.load()