summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-02 21:39:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-06 16:45:34 +0100
commit9435b6cf10efb11c4ad206e06665321b058d943e (patch)
treed2edc3bd86115f4fff2f3e058d508ccbe632d965 /bitbake/lib/bb/data.py
parentf15a1f2b7f53b574b5fe0294fc16e88546f97875 (diff)
downloadpoky-9435b6cf10efb11c4ad206e06665321b058d943e.tar.gz
bitbake: data/siggen: Don't expand ignored variables
If a variable is in the signature whitelist, we'd currently expand it, then later ignore the data. This is problemtic for code which has effects when expanded, recently source date epoch in OE-Core for example. We don't actually need to do this, if we pass the whitelist into the earlier function it can avoid the expansion. This also also give a small performance boost since we avoid running code in some cases. [YOCTO #13581] (Bitbake rev: f483ee4a869fb1dafbe4bdf2da228cdaa40b38bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 6dc02172cb..b0683c5180 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -365,7 +365,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
365 #bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs))) 365 #bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs)))
366 #d.setVarFlag(key, "vardeps", deps) 366 #d.setVarFlag(key, "vardeps", deps)
367 367
368def generate_dependencies(d): 368def generate_dependencies(d, whitelist):
369 369
370 keys = set(key for key in d if not key.startswith("__")) 370 keys = set(key for key in d if not key.startswith("__"))
371 shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export", False) and not d.getVarFlag(key, "unexport", False)) 371 shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export", False) and not d.getVarFlag(key, "unexport", False))
@@ -380,7 +380,7 @@ def generate_dependencies(d):
380 newdeps = deps[task] 380 newdeps = deps[task]
381 seen = set() 381 seen = set()
382 while newdeps: 382 while newdeps:
383 nextdeps = newdeps 383 nextdeps = newdeps - whitelist
384 seen |= nextdeps 384 seen |= nextdeps
385 newdeps = set() 385 newdeps = set()
386 for dep in nextdeps: 386 for dep in nextdeps: