diff options
author | Mateusz Marciniec <mateuszmar2@gmail.com> | 2023-02-11 00:18:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-15 10:21:34 +0000 |
commit | c9273b8f2f3e9da409d457fa239c914c3435dc61 (patch) | |
tree | 533a2b31bc8523d50ab6c8bfc6a0f1da4e06c95d /meta/lib | |
parent | 7c97bfbed4b96b652e6d71c3bb78e42b0c7c010e (diff) | |
download | poky-c9273b8f2f3e9da409d457fa239c914c3435dc61.tar.gz |
sstatesig: Improve output hash calculation
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.
(From OE-Core rev: ee729163f31f26b1462a47e1e53f7a0f9de9b464)
Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com>
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/sstatesig.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index f0224454c9..ae7ef14453 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -652,6 +652,10 @@ def OEOuthashBasic(path, sigfile, task, d): | |||
652 | if f == 'fixmepath': | 652 | if f == 'fixmepath': |
653 | continue | 653 | continue |
654 | process(os.path.join(root, f)) | 654 | process(os.path.join(root, f)) |
655 | |||
656 | for dir in dirs: | ||
657 | if os.path.islink(os.path.join(root, dir)): | ||
658 | process(os.path.join(root, dir)) | ||
655 | finally: | 659 | finally: |
656 | os.chdir(prev_dir) | 660 | os.chdir(prev_dir) |
657 | 661 | ||