From: mateuszmar2@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Mateusz Marciniec <mateuszmar2@gmail.com>,
Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Subject: [OE-core][PATCH] sstatesig: Improve output hash calculation
Date: Thu, 9 Feb 2023 00:50:11 +0100 [thread overview]
Message-ID: <20230208235011.40486-1-mateuszmar2@gmail.com> (raw)
From: Mateusz Marciniec <mateuszmar2@gmail.com>
Symbolic links to the files are included during the output hash
calculation but symlinks to the directories are missed.
So if the new symlink to a directory was the only change made,
then the output hash won't change,
and the Hash Equivalence server may change unihash.
In the next run bitbake may use an older package from sstate-cache.
To fix this followlinks=True flag could be set for os.walk
but it can lead to infinite recursion if link points
to a parent directory of itself.
Also, all files from a directory to which symlink points
would be included in depsig file.
Therefore another solution was applied, I added code that will loop
through directories and process those that are symlinks.
Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com>
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
---
meta/lib/oe/sstatesig.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index f0224454c9..a5bc030f58 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -652,6 +652,11 @@ def OEOuthashBasic(path, sigfile, task, d):
if f == 'fixmepath':
continue
process(os.path.join(root, f))
+
+ for d in dirs:
+ if not os.path.islink(os.path.join(root, d)):
+ continue
+ process(os.path.join(root, d))
finally:
os.chdir(prev_dir)
--
2.39.1
next reply other threads:[~2023-02-08 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 23:50 mateuszmar2 [this message]
2023-02-09 9:43 ` [OE-core][PATCH] sstatesig: Improve output hash calculation Peter Kjellerstedt
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=20230208235011.40486-1-mateuszmar2@gmail.com \
--to=mateuszmar2@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=tomasz.dziendzielski@gmail.com \
/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