diff options
author | Dorinda <dorindabassey@gmail.com> | 2021-01-31 22:22:56 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-11 17:46:11 +0000 |
commit | ecb66ea62e9bfdeb8e8e170dd104de0236c04a17 (patch) | |
tree | 9f94447a0e1d1a92b5cc945587c31856c3a88889 /meta/classes/sanity.bbclass | |
parent | 226c23ea54962375aa9e9a59af9319b3c18e96db (diff) | |
download | poky-ecb66ea62e9bfdeb8e8e170dd104de0236c04a17.tar.gz |
sanity.bbclass: Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap
Added a sanity check for when PSEUDO_IGNORE_PATHS and paths under pseudo control overlap to avoid random failures generated.
[YOCTO #14193]
(From OE-Core rev: 79368ef09e9eddfea8bcc39ca2b35f64b401fb35)
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6e4bd8cabcdedf4b52345ef5eb421f71d0f19b1d)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 16275b2ea5..01c5434f0d 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -710,6 +710,16 @@ def check_sanity_version_change(status, d): | |||
710 | if i and workdir.startswith(i): | 710 | if i and workdir.startswith(i): |
711 | status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n") | 711 | status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n") |
712 | 712 | ||
713 | # Check if PSEUDO_IGNORE_PATHS and and paths under pseudo control overlap | ||
714 | pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") | ||
715 | pseudo_control_dir = "${D},${PKGD},${PKGDEST},${IMAGEROOTFS},${SDK_OUTPUT}" | ||
716 | pseudocontroldir = d.expand(pseudo_control_dir).split(",") | ||
717 | for i in pseudoignorepaths: | ||
718 | for j in pseudocontroldir: | ||
719 | if i and j: | ||
720 | if j.startswith(i): | ||
721 | status.addresult("A path included in PSEUDO_IGNORE_PATHS " + str(i) + " and the path " + str(j) + " overlap and this will break pseudo permission and ownership tracking. Please set the path " + str(j) + " to a different directory which does not overlap with pseudo controlled directories. \n") | ||
722 | |||
713 | # Some third-party software apparently relies on chmod etc. being suid root (!!) | 723 | # Some third-party software apparently relies on chmod etc. being suid root (!!) |
714 | import stat | 724 | import stat |
715 | suid_check_bins = "chown chmod mknod".split() | 725 | suid_check_bins = "chown chmod mknod".split() |