sstatesig: Improve output hash calculation
PATCH v3 1/1 sstatesig: Improve output hash calculation
From: Mateusz Marciniec <[email protected]>
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.
--- meta/lib/oe/sstatesig.py | 4 ++++ 1 file changed, 4 insertions(+)
meta/lib/oe/sstatesig.py +4 -0
@@ -652,6 +652,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)
Signature · 1 line
2.39.1