mirror of
https://git.yoctoproject.org/poky
synced 2026-07-15 15:37:03 +00:00
bitbake.conf/pseudo: Switch from exclusion list to inclusion list
Currently, pseudo tracks all files referenced within its presence unless they're listed in an exclusion list. The exclusion list has grown to be fairly unwieldy. This patch swaps PSEUDO_IGNORE_PATHS for PSEUDO_INCLUDE_PATHS which in theory should be easier and more explicit to maintain. This change does drop many directories from pseudo coverage including /home and /tmp. There may be adapatations needed for recipes/classes using pseudo in specific ways. (From OE-Core rev: 2502da81709f25de499277b28d33c915638c45f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -44,7 +44,6 @@ python do_populate_lic() {
|
||||
oe.qa.exit_if_errors(d)
|
||||
}
|
||||
|
||||
PSEUDO_IGNORE_PATHS .= ",${@','.join(((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' + (d.getVar('LICENSE_PATH') or '') + ' ' + d.getVar('COREBASE') + '/meta/COPYING').split())}"
|
||||
# it would be better to copy them in do_install:append, but find_license_files is python
|
||||
python perform_packagecopy:prepend () {
|
||||
enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d)
|
||||
|
||||
@@ -733,14 +733,14 @@ def check_sanity_version_change(status, d):
|
||||
status.addresult("TMPDIR is setuid, please don't build in a setuid directory")
|
||||
|
||||
# Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS
|
||||
pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
|
||||
pseudoignorepaths = (d.getVar('PSEUDO_IGNORE_PATHS', expand=True) or "").split(",")
|
||||
workdir = d.getVar('WORKDIR', expand=True)
|
||||
for i in pseudoignorepaths:
|
||||
if i and workdir.startswith(i):
|
||||
status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n")
|
||||
|
||||
# Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap
|
||||
pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
|
||||
pseudoignorepaths = (d.getVar('PSEUDO_IGNORE_PATHS', expand=True) or "").split(",")
|
||||
pseudo_control_dir = "${D},${PKGD},${PKGDEST},${IMAGEROOTFS},${SDK_OUTPUT}"
|
||||
pseudocontroldir = d.expand(pseudo_control_dir).split(",")
|
||||
for i in pseudoignorepaths:
|
||||
|
||||
@@ -76,7 +76,7 @@ SSTATE_SCAN_CMD_NATIVE ??= 'grep -Irl -e ${RECIPE_SYSROOT} -e ${RECIPE_SYSROOT_N
|
||||
SSTATE_HASHEQUIV_FILEMAP ?= " \
|
||||
populate_sysroot:*/postinst-useradd-*:${TMPDIR} \
|
||||
populate_sysroot:*/postinst-useradd-*:${COREBASE} \
|
||||
populate_sysroot:*/postinst-useradd-*:regex-\s(PATH|PSEUDO_IGNORE_PATHS|HOME|LOGNAME|OMP_NUM_THREADS|USER)=.*\s \
|
||||
populate_sysroot:*/postinst-useradd-*:regex-\s(PATH|PSEUDO_INCLUDE_PATHS|HOME|LOGNAME|OMP_NUM_THREADS|USER)=.*\s \
|
||||
populate_sysroot:*/crossscripts/*:${TMPDIR} \
|
||||
populate_sysroot:*/crossscripts/*:${COREBASE} \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user