diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-10 16:54:21 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-12 22:01:56 +0100 |
| commit | 6a2ad60ecc7739d7dbfdf74d67200df374bca4ef (patch) | |
| tree | 0012a7044a5a9cd98ea0c2fdbbe19e13384a6926 /meta/classes-global | |
| parent | c40f78b267bab09925f4879dbfbb6ec2f837187c (diff) | |
| download | poky-6a2ad60ecc7739d7dbfdf74d67200df374bca4ef.tar.gz | |
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>
Diffstat (limited to 'meta/classes-global')
| -rw-r--r-- | meta/classes-global/license.bbclass | 1 | ||||
| -rw-r--r-- | meta/classes-global/sanity.bbclass | 4 | ||||
| -rw-r--r-- | meta/classes-global/sstate.bbclass | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass index 94dcc7f331..af5f1ed41d 100644 --- a/meta/classes-global/license.bbclass +++ b/meta/classes-global/license.bbclass | |||
| @@ -44,7 +44,6 @@ python do_populate_lic() { | |||
| 44 | oe.qa.exit_if_errors(d) | 44 | oe.qa.exit_if_errors(d) |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | PSEUDO_IGNORE_PATHS .= ",${@','.join(((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' + (d.getVar('LICENSE_PATH') or '') + ' ' + d.getVar('COREBASE') + '/meta/COPYING').split())}" | ||
| 48 | # it would be better to copy them in do_install:append, but find_license_files is python | 47 | # it would be better to copy them in do_install:append, but find_license_files is python |
| 49 | python perform_packagecopy:prepend () { | 48 | python perform_packagecopy:prepend () { |
| 50 | enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d) | 49 | enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d) |
diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index 192582b82e..d1452967fc 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass | |||
| @@ -733,14 +733,14 @@ def check_sanity_version_change(status, d): | |||
| 733 | status.addresult("TMPDIR is setuid, please don't build in a setuid directory") | 733 | status.addresult("TMPDIR is setuid, please don't build in a setuid directory") |
| 734 | 734 | ||
| 735 | # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS | 735 | # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS |
| 736 | pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") | 736 | pseudoignorepaths = (d.getVar('PSEUDO_IGNORE_PATHS', expand=True) or "").split(",") |
| 737 | workdir = d.getVar('WORKDIR', expand=True) | 737 | workdir = d.getVar('WORKDIR', expand=True) |
| 738 | for i in pseudoignorepaths: | 738 | for i in pseudoignorepaths: |
| 739 | if i and workdir.startswith(i): | 739 | if i and workdir.startswith(i): |
| 740 | status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n") | 740 | status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n") |
| 741 | 741 | ||
| 742 | # Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap | 742 | # Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap |
| 743 | pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") | 743 | pseudoignorepaths = (d.getVar('PSEUDO_IGNORE_PATHS', expand=True) or "").split(",") |
| 744 | pseudo_control_dir = "${D},${PKGD},${PKGDEST},${IMAGEROOTFS},${SDK_OUTPUT}" | 744 | pseudo_control_dir = "${D},${PKGD},${PKGDEST},${IMAGEROOTFS},${SDK_OUTPUT}" |
| 745 | pseudocontroldir = d.expand(pseudo_control_dir).split(",") | 745 | pseudocontroldir = d.expand(pseudo_control_dir).split(",") |
| 746 | for i in pseudoignorepaths: | 746 | for i in pseudoignorepaths: |
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass index 2c259a6657..1d7b033b80 100644 --- a/meta/classes-global/sstate.bbclass +++ b/meta/classes-global/sstate.bbclass | |||
| @@ -76,7 +76,7 @@ SSTATE_SCAN_CMD_NATIVE ??= 'grep -Irl -e ${RECIPE_SYSROOT} -e ${RECIPE_SYSROOT_N | |||
| 76 | SSTATE_HASHEQUIV_FILEMAP ?= " \ | 76 | SSTATE_HASHEQUIV_FILEMAP ?= " \ |
| 77 | populate_sysroot:*/postinst-useradd-*:${TMPDIR} \ | 77 | populate_sysroot:*/postinst-useradd-*:${TMPDIR} \ |
| 78 | populate_sysroot:*/postinst-useradd-*:${COREBASE} \ | 78 | populate_sysroot:*/postinst-useradd-*:${COREBASE} \ |
| 79 | populate_sysroot:*/postinst-useradd-*:regex-\s(PATH|PSEUDO_IGNORE_PATHS|HOME|LOGNAME|OMP_NUM_THREADS|USER)=.*\s \ | 79 | populate_sysroot:*/postinst-useradd-*:regex-\s(PATH|PSEUDO_INCLUDE_PATHS|HOME|LOGNAME|OMP_NUM_THREADS|USER)=.*\s \ |
| 80 | populate_sysroot:*/crossscripts/*:${TMPDIR} \ | 80 | populate_sysroot:*/crossscripts/*:${TMPDIR} \ |
| 81 | populate_sysroot:*/crossscripts/*:${COREBASE} \ | 81 | populate_sysroot:*/crossscripts/*:${COREBASE} \ |
| 82 | " | 82 | " |
