diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 3a7dac4cb7..9485bf5d8a 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -30,6 +30,7 @@ class SignatureGenerator(object): | |||
30 | name = "noop" | 30 | name = "noop" |
31 | 31 | ||
32 | def __init__(self, data): | 32 | def __init__(self, data): |
33 | self.basehash = {} | ||
33 | self.taskhash = {} | 34 | self.taskhash = {} |
34 | self.runtaskdeps = {} | 35 | self.runtaskdeps = {} |
35 | self.file_checksum_values = {} | 36 | self.file_checksum_values = {} |
@@ -61,11 +62,10 @@ class SignatureGenerator(object): | |||
61 | return | 62 | return |
62 | 63 | ||
63 | def get_taskdata(self): | 64 | def get_taskdata(self): |
64 | return (self.runtaskdeps, self.taskhash, self.file_checksum_values, self.taints) | 65 | return (self.runtaskdeps, self.taskhash, self.file_checksum_values, self.taints, self.basehash) |
65 | 66 | ||
66 | def set_taskdata(self, data): | 67 | def set_taskdata(self, data): |
67 | self.runtaskdeps, self.taskhash, self.file_checksum_values, self.taints = data | 68 | self.runtaskdeps, self.taskhash, self.file_checksum_values, self.taints, self.basehash = data |
68 | |||
69 | 69 | ||
70 | class SignatureGeneratorBasic(SignatureGenerator): | 70 | class SignatureGeneratorBasic(SignatureGenerator): |
71 | """ | 71 | """ |
@@ -133,7 +133,11 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
133 | var = lookupcache[dep] | 133 | var = lookupcache[dep] |
134 | if var is not None: | 134 | if var is not None: |
135 | data = data + str(var) | 135 | data = data + str(var) |
136 | self.basehash[fn + "." + task] = hashlib.md5(data.encode("utf-8")).hexdigest() | 136 | datahash = hashlib.md5(data.encode("utf-8")).hexdigest() |
137 | k = fn + "." + task | ||
138 | if k in self.basehash and self.basehash[k] != datahash: | ||
139 | bb.error("When reparsing %s, the basehash value changed from %s to %s. The metadata is not deterministic and this needs to be fixed." % (k, self.basehash[k], datahash)) | ||
140 | self.basehash[k] = datahash | ||
137 | taskdeps[task] = alldeps | 141 | taskdeps[task] = alldeps |
138 | 142 | ||
139 | self.taskdeps[fn] = taskdeps | 143 | self.taskdeps[fn] = taskdeps |
@@ -182,6 +186,7 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
182 | def get_taskhash(self, fn, task, deps, dataCache): | 186 | def get_taskhash(self, fn, task, deps, dataCache): |
183 | k = fn + "." + task | 187 | k = fn + "." + task |
184 | data = dataCache.basetaskhash[k] | 188 | data = dataCache.basetaskhash[k] |
189 | self.basehash[k] = data | ||
185 | self.runtaskdeps[k] = [] | 190 | self.runtaskdeps[k] = [] |
186 | self.file_checksum_values[k] = [] | 191 | self.file_checksum_values[k] = [] |
187 | recipename = dataCache.pkg_fn[fn] | 192 | recipename = dataCache.pkg_fn[fn] |