]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
authorDorinda <dorindabassey@gmail.com>
Wed, 27 Jan 2021 22:52:57 +0000 (23:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 30 Jan 2021 10:38:49 +0000 (10:38 +0000)
added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to avoid random failures generated.

[YOCTO #14193]

Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index c6842ff54931623a488c8468b858d80332253e9f..34215ebfb28e07b09f32f33b23ad90c3ca07c779 100644 (file)
@@ -710,6 +710,14 @@ def check_sanity_version_change(status, d):
         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 ${S} overlap
+    pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
+    sourcefile = d.getVar('S')
+    for i in pseudoignorepaths:
+        if i and sourcefile:
+            if sourcefile.startswith(i) or i.startswith(sourcefile):
+                status.addresult("a path included in PSEUDO_IGNORE_PATHS " + str(i) + " and ${S} (source files) path " + str(sourcefile) + " are overlapping each other, please set ${S} in your recipe to point to a different directory. \n")
+
     # Some third-party software apparently relies on chmod etc. being suid root (!!)
     import stat
     suid_check_bins = "chown chmod mknod".split()