summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data.py5
-rw-r--r--bitbake/lib/bb/siggen.py27
2 files changed, 22 insertions, 10 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 198b628fad..50f2218a70 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -313,12 +313,10 @@ def generate_dependencies(d):
shelldeps = set(key for key in keys if d.getVarFlag(key, "export") and not d.getVarFlag(key, "unexport"))
deps = {}
- taskdeps = {}
tasklist = bb.data.getVar('__BBTASKS', d) or []
for task in tasklist:
deps[task] = build_dependencies(task, keys, shelldeps, d)
-
newdeps = deps[task]
seen = set()
while newdeps:
@@ -330,9 +328,8 @@ def generate_dependencies(d):
deps[dep] = build_dependencies(dep, keys, shelldeps, d)
newdeps |= deps[dep]
newdeps -= seen
- taskdeps[task] = seen | newdeps
#print "For %s: %s" % (task, str(taskdeps[task]))
- return taskdeps, deps
+ return tasklist, deps
def inherits_class(klass, d):
val = getVar('__inherit_cache', d) or []
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 4dc09b3f9e..010c2cab26 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -57,7 +57,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
self.runtaskdeps = {}
self.gendeps = {}
self.lookupcache = {}
- self.basewhitelist = (data.getVar("BB_HASHBASE_WHITELIST", True) or "").split()
+ self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST", True) or "").split())
self.taskwhitelist = data.getVar("BB_HASHTASK_WHITELIST", True) or None
if self.taskwhitelist:
@@ -67,17 +67,31 @@ class SignatureGeneratorBasic(SignatureGenerator):
def _build_data(self, fn, d):
- taskdeps, gendeps = bb.data.generate_dependencies(d)
+ tasklist, gendeps = bb.data.generate_dependencies(d)
+ taskdeps = {}
basehash = {}
lookupcache = {}
- for task in taskdeps:
+ for task in tasklist:
data = d.getVar(task, False)
lookupcache[task] = data
- for dep in sorted(taskdeps[task]):
- if dep in self.basewhitelist:
- continue
+
+ newdeps = gendeps[task]
+ seen = set()
+ while newdeps:
+ nextdeps = newdeps
+ seen |= nextdeps
+ newdeps = set()
+ for dep in nextdeps:
+ if dep in self.basewhitelist:
+ continue
+ newdeps |= gendeps[dep]
+ newdeps -= seen
+
+ alldeps = seen - self.basewhitelist
+
+ for dep in sorted(alldeps):
if dep in lookupcache:
var = lookupcache[dep]
else:
@@ -88,6 +102,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
if data is None:
bb.error("Task %s from %s seems to be empty?!" % (task, fn))
self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest()
+ taskdeps[task] = sorted(alldeps)
self.taskdeps[fn] = taskdeps
self.gendeps[fn] = gendeps