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>2022-09-27 09:19:07 -0600
commit7c78c7728afe167515eb26f26194380b0e9c8751 (patch)
tree005aaeba120f34d4f1673a2a0505a2557fc7ec7d
parent4212c140240e06cf00ff133ea87252659b080fa8 (diff)
downloadopenembedded-core-contrib-7c78c7728afe167515eb26f26194380b0e9c8751.tar.gz
externalsrc: avoid adding trailing / to build path
When setting externalsrcbuild, do not add a trailing /, that should be a warning, but overriding B happens after the warning is checked. Likewise, redo the trailing slash warnings for EXTERNALSRC and EXTERNALSRC_BUILD. Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
-rw-r--r--meta/classes-recipe/externalsrc.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes-recipe/externalsrc.bbclass b/meta/classes-recipe/externalsrc.bbclass
index ce753fce76..1e98e2f7a0 100644
--- a/meta/classes-recipe/externalsrc.bbclass
+++ b/meta/classes-recipe/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
@@ -61,7 +67,7 @@ python () {
if externalsrcbuild:
d.setVar('B', externalsrcbuild)
else:
- d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
+ d.setVar('B', '${WORKDIR}/${BPN}-${PV}')
local_srcuri = []
fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)