On Thu, 2020-04-02 at 13:08 -0500, Joshua Watt wrote:
> Don't capture the source date epoch for recipes that are not being
> finalized. This prevents a virtual recipe (e.g. multilib) from
> attempting to read the source date epoch file from the non-virtual
> recipes workdir.
> 
> [YOCTO #13851]
> 
> Signed-off-by: Joshua Watt <[email protected]>
> ---
>  meta/classes/reproducible_build.bbclass | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

What puzzles me with this is that we're telling bitbake to ignore the
variable for hashing purposes, yet it still goes ahead and executes it.

If we decide that is a bug, we can come up with the patch that follows
below, which I think should also fix this issue and perhaps some
others?

data/siggen: Don't expand ignored variables

Signed-off-by: Richard Purdie <[email protected]>
---
 bitbake/lib/bb/data.py       | 4 ++--
 bitbake/lib/bb/siggen.py     | 2 +-
 bitbake/lib/bb/tests/data.py | 2 +-
 3 files changed, 4 insertions(+), 4 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):
     #bb.note("Variable %s references %s and calls %s" % (key, str(deps), 
str(execs)))
     #d.setVarFlag(key, "vardeps", deps)
 
-def generate_dependencies(d):
+def generate_dependencies(d, whitelist):
 
     keys = set(key for key in d if not key.startswith("__"))
     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):
         newdeps = deps[task]
         seen = set()
         while newdeps:
-            nextdeps = newdeps
+            nextdeps = newdeps - whitelist
             seen |= nextdeps
             newdeps = set()
             for dep in nextdeps:
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 8bfc45235d..4c8d81c5da 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -146,7 +146,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
     def _build_data(self, fn, d):
 
         ignore_mismatch = ((d.getVar("BB_HASH_IGNORE_MISMATCH") or '') == '1')
-        tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d)
+        tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d, 
self.basewhitelist)
 
         taskdeps, basehash = bb.data.generate_dependency_hash(tasklist, 
gendeps, lookupcache, self.basewhitelist, fn)
 
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py
index 2b137706dd..5f195047de 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -476,7 +476,7 @@ class Contains(unittest.TestCase):
 class TaskHash(unittest.TestCase):
     def test_taskhashes(self):
         def gettask_bashhash(taskname, d):
-            tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d)
+            tasklist, gendeps, lookupcache = bb.data.generate_dependencies(d, 
set())
             taskdeps, basehash = bb.data.generate_dependency_hash(tasklist, 
gendeps, lookupcache, set(), "somefile")
             bb.warn(str(lookupcache))
             return basehash["somefile:" + taskname]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136963): 
https://lists.openembedded.org/g/openembedded-core/message/136963
Mute This Topic: https://lists.openembedded.org/mt/72731348/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to