summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorDorinda <dorindabassey@gmail.com>2021-01-26 01:53:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-27 10:17:45 +0000
commitbfeeaf9ff148a61868e0c882b7455dc02ca8ed76 (patch)
tree8201e4d945f6b9b21cf28b0abe9e74b5b412fb1c /meta/classes
parentd647db7c3087cee051e29211d6c519d3c9575b3d (diff)
downloadpoky-bfeeaf9ff148a61868e0c882b7455dc02ca8ed76.tar.gz
sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHS
If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS. [YOCTO #14179] (From OE-Core rev: 7a681525e904914e938de25df5cc64209097d15d) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index d134b40a87..62b5253911 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -703,6 +703,13 @@ def check_sanity_version_change(status, d):
703 if (tmpdirmode & stat.S_ISUID): 703 if (tmpdirmode & stat.S_ISUID):
704 status.addresult("TMPDIR is setuid, please don't build in a setuid directory") 704 status.addresult("TMPDIR is setuid, please don't build in a setuid directory")
705 705
706 # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS
707 pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
708 workdir = d.getVar('WORKDIR', expand=True)
709 for i in pseudoignorepaths:
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")
712
706 # Some third-party software apparently relies on chmod etc. being suid root (!!) 713 # Some third-party software apparently relies on chmod etc. being suid root (!!)
707 import stat 714 import stat
708 suid_check_bins = "chown chmod mknod".split() 715 suid_check_bins = "chown chmod mknod".split()