public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Joshua Watt <JPEWhacker@gmail.com>,
	 openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] classes/reproducible_build: Skip SDE for non-finalizing virtual recipes
Date: Thu, 02 Apr 2020 21:42:18 +0100	[thread overview]
Message-ID: <b69366f4b2632b18997691497c8799a93cb36b27.camel@linuxfoundation.org> (raw)
In-Reply-To: <20200402180832.12814-1-JPEWhacker@gmail.com>

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 <JPEWhacker@gmail.com>
> ---
>  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 <richard.purdie@linuxfoundation.org>
---
 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]


  parent reply	other threads:[~2020-04-02 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 18:08 [OE-core][PATCH] classes/reproducible_build: Skip SDE for non-finalizing virtual recipes Joshua Watt
2020-04-02 20:15 ` Richard Purdie
2020-04-02 23:04   ` Joshua Watt
2020-04-02 20:42 ` Richard Purdie [this message]
2020-04-02 23:09   ` Joshua Watt
2020-04-03 14:34   ` Joshua Watt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b69366f4b2632b18997691497c8799a93cb36b27.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=JPEWhacker@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox