From ac46c1d54f518cf88f03b4576e6be087b266b7fe Mon Sep 17 00:00:00 2001 From: Mateusz Marciniec Date: Sat, 11 Feb 2023 00:18:34 +0100 Subject: 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: f1f24e9dc4d4016702d40ec5567cf65d9c04000d) Signed-off-by: Mateusz Marciniec Signed-off-by: Tomasz Dziendzielski Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit ee729163f31f26b1462a47e1e53f7a0f9de9b464) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/lib/oe/sstatesig.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index bf48aed7e1..fb4abe8241 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py @@ -662,6 +662,10 @@ def OEOuthashBasic(path, sigfile, task, d): if f == 'fixmepath': continue process(os.path.join(root, f)) + + for dir in dirs: + if os.path.islink(os.path.join(root, dir)): + process(os.path.join(root, dir)) finally: os.chdir(prev_dir) -- cgit v1.2.3-54-g00ecf