summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel McGregor <daniel.mcgregor@vecima.com>2022-09-14 14:35:39 -0600
committerDaniel McGregor <daniel.mcgregor@vecima.com>2023-04-24 12:30:45 -0600
commit568cb676ae7b8fa433867e88810b438f4269a14e (patch)
tree9a6aa3b61b87930b04e07bf77f18d64c4d165141
parent92940ca9a04b198e78eb1b4d54445b35922ae85b (diff)
downloadopenembedded-core-contrib-dankm/vecima/externalsrc.tar.gz
externalsrc: Add trailing slash warningsdankm/vecima/externalsrc
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>
-rw-r--r--meta/classes/externalsrc.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 10d78484d6..6edf80dbdc 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -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