summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2011-11-23 02:04:00 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-23 23:40:07 +0000
commit2485a81f48c141ccd612121f15918673fe276f15 (patch)
tree48b82b3b19c1458df1ad2d41ab183447ba517204
parenta89443e1e0d957464ac024f97a159a71d14b4cd6 (diff)
downloadpoky-2485a81f48c141ccd612121f15918673fe276f15.tar.gz
siggen.py: sort task hash depedencies with basepath
Without this patch the tash hash dependencies can be in a order that is dependent upon directory/filesystem layout. With this change the data is sorted the same regardless. Without this the dependent hashes could be in different orders on different systems and consequently final md5 hash would differ as well even though nothing else changed. (Bitbake rev: 9a2029899c946ce9aa8adbc85f2cfe7a85b92182) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/siggen.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 3eed66425e..9231291b43 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -136,7 +136,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
136 k = fn + "." + task 136 k = fn + "." + task
137 data = dataCache.basetaskhash[k] 137 data = dataCache.basetaskhash[k]
138 self.runtaskdeps[k] = [] 138 self.runtaskdeps[k] = []
139 for dep in sorted(deps): 139 for dep in sorted(deps, key=clean_basepath):
140 # We only manipulate the dependencies for packages not in the whitelist 140 # We only manipulate the dependencies for packages not in the whitelist
141 if self.twl and not self.twl.search(dataCache.pkg_fn[fn]): 141 if self.twl and not self.twl.search(dataCache.pkg_fn[fn]):
142 # then process the actual dependencies 142 # then process the actual dependencies
@@ -218,6 +218,19 @@ def dump_this_task(outfile, d):
218 task = "do_" + d.getVar("BB_CURRENTTASK", True) 218 task = "do_" + d.getVar("BB_CURRENTTASK", True)
219 bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile") 219 bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
220 220
221def clean_basepath(a):
222 if a.startswith("virtual:"):
223 b = a.rsplit(":", 1)[0] + a.rsplit("/", 1)[1]
224 else:
225 b = a.rsplit("/", 1)[1]
226 return b
227
228def clean_basepaths(a):
229 b = {}
230 for x in a:
231 b[clean_basepath(x)] = a[x]
232 return b
233
221def compare_sigfiles(a, b): 234def compare_sigfiles(a, b):
222 p1 = pickle.Unpickler(file(a, "rb")) 235 p1 = pickle.Unpickler(file(a, "rb"))
223 a_data = p1.load() 236 a_data = p1.load()
@@ -236,16 +249,6 @@ def compare_sigfiles(a, b):
236 removed = sb - sa 249 removed = sb - sa
237 return changed, added, removed 250 return changed, added, removed
238 251
239 def clean_basepaths(a):
240 b = {}
241 for x in a:
242 if x.startswith("virtual:"):
243 y = x.rsplit(":", 1)[0] + x.rsplit("/", 1)[1]
244 else:
245 y = x.rsplit("/", 1)[1]
246 b[y] = a[x]
247 return b
248
249 if 'basewhitelist' in a_data and a_data['basewhitelist'] != b_data['basewhitelist']: 252 if 'basewhitelist' in a_data and a_data['basewhitelist'] != b_data['basewhitelist']:
250 print "basewhitelist changed from %s to %s" % (a_data['basewhitelist'], b_data['basewhitelist']) 253 print "basewhitelist changed from %s to %s" % (a_data['basewhitelist'], b_data['basewhitelist'])
251 print "changed items: %s" % a_data['basewhitelist'].symmetric_difference(b_data['basewhitelist']) 254 print "changed items: %s" % a_data['basewhitelist'].symmetric_difference(b_data['basewhitelist'])