sstatesig: Add processing for full build paths in sysroot files

Some files in the populate_sysroot tasks have hardcoded paths in them,
particularly if they are postinst-useradd- files or crossscripts.

Add some filtering logic to remove these paths.

This means that the hashequiv "outhash" matches correcting in more
cases allowing for better build artefact reuse.

To make this work a new variable is added SSTATE_HASHEQUIV_FILEMAP
which maps file globbing to replacement patterns (paths or regex)
on a per sstate task basis. It is hoped this shouldn't be needed
in many cases. We are in the process to developing QA tests which
will better detect issues in this area to allow optimal sstate
reuse.

(From OE-Core rev: d9852ffbbe728dac33dc081538a08af98f52fd4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2021-09-29 15:02:08 +01:00
parent 0b4198eeac
commit 86c7d3e031
6 changed files with 64 additions and 3 deletions

View File

@@ -195,6 +195,14 @@ do_install:append:class-nativesdk () {
}
SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py"
SSTATE_HASHEQUIV_FILEMAP = " \
populate_sysroot:*/lib*/python3*/_sysconfigdata*.py:${TMPDIR} \
populate_sysroot:*/lib*/python3*/_sysconfigdata*.py:${COREBASE} \
populate_sysroot:*/lib*/python3*/config-*/Makefile:${TMPDIR} \
populate_sysroot:*/lib*/python3*/config-*/Makefile:${COREBASE} \
populate_sysroot:*/lib*/python-sysconfigdata/_sysconfigdata.py:${TMPDIR} \
populate_sysroot:*/lib*/python-sysconfigdata/_sysconfigdata.py:${COREBASE} \
"
PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
py_package_preprocess () {