]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
externalsrc: Add trailing slash warnings dankm/vecima/externalsrc
authorDaniel McGregor <daniel.mcgregor@vecima.com>
Wed, 14 Sep 2022 20:35:39 +0000 (14:35 -0600)
committerDaniel McGregor <daniel.mcgregor@vecima.com>
Mon, 24 Apr 2023 18:30:45 +0000 (12:30 -0600)
When setting EXTERNALSRCBUILD or EXTERNALSRC, adding a trailing /
should be a warning, but overriding B happens after the warning is
checked.
So, also do the trailing slash warnings for EXTERNALSRC and
EXTERNALSRC_BUILD in the externalsrc class.

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
meta/classes/externalsrc.bbclass

index 10d78484d698c2743ba76e07884958042d73d16c..6edf80dbdc4d43e351ce55247a44ef5f974bfb47 100644 (file)
@@ -37,6 +37,12 @@ python () {
     if externalsrcbuild and not externalsrcbuild.startswith("/"):
         bb.error("EXTERNALSRC_BUILD must be an absolute path")
 
+    if d.getVar('BB_WORKERCONTEXT') != '1':
+        if externalsrc and externalsrc[-1] == '/':
+            bb.warn("EXTERNALSRC must not contain a traling slash, Remove it.")
+        if externalsrcbuild and externalsrcbuild[-1] == '/':
+            bb.warn("EXTERNALSRC_BUILD must not contain a traling slash, Remove it.")
+
     # If this is the base recipe and EXTERNALSRC is set for it or any of its
     # derivatives, then enable BB_DONT_CACHE to force the recipe to always be
     # re-parsed so that the file-checksums function for do_compile is run every