summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorMateusz Marciniec <mateuszmar2@gmail.com>2023-02-11 00:18:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-09 13:19:03 +0000
commit88ddcabccaa2367ab2164dcaed1a1d9605b7d93a (patch)
treed9d6f1c47bccac7228ac7be4e5cd96f37881c5e5 /meta/lib
parent45efd8bc4424d8eff693f4e12a1be2acf503947c (diff)
downloadpoky-88ddcabccaa2367ab2164dcaed1a1d9605b7d93a.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: 477a4e816494e256b309fd7e84b2c3796708e6e8) 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> (cherry picked from commit ee729163f31f26b1462a47e1e53f7a0f9de9b464) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/sstatesig.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index bbe28efa81..30f27b0f4f 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -660,6 +660,10 @@ def OEOuthashBasic(path, sigfile, task, d):
660 if f == 'fixmepath': 660 if f == 'fixmepath':
661 continue 661 continue
662 process(os.path.join(root, f)) 662 process(os.path.join(root, f))
663
664 for dir in dirs:
665 if os.path.islink(os.path.join(root, dir)):
666 process(os.path.join(root, dir))
663 finally: 667 finally:
664 os.chdir(prev_dir) 668 os.chdir(prev_dir)
665 669