summaryrefslogtreecommitdiffstats
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-06 15:09:42 +0000
commitac46c1d54f518cf88f03b4576e6be087b266b7fe (patch)
tree33275b6397ba25faa7d0db097e72c62751384a5c
parent4c792c4398142ad4a4fc6b9cf10fae3869cc9a89 (diff)
downloadpoky-ac46c1d54f518cf88f03b4576e6be087b266b7fe.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: f1f24e9dc4d4016702d40ec5567cf65d9c04000d) 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>
-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 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):
662 if f == 'fixmepath': 662 if f == 'fixmepath':
663 continue 663 continue
664 process(os.path.join(root, f)) 664 process(os.path.join(root, f))
665
666 for dir in dirs:
667 if os.path.islink(os.path.join(root, dir)):
668 process(os.path.join(root, dir))
665 finally: 669 finally:
666 os.chdir(prev_dir) 670 os.chdir(prev_dir)
667 671