summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-06-13 17:44:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-14 14:45:00 +0100
commit946b6623154e748a0d75ff498802a720aeec27a6 (patch)
treea5d222f907f1ad56e36d74eab2238da2fe416f2f
parentcd9af17028c069f52fb0616074170093dd63c143 (diff)
downloadopenembedded-core-contrib-946b6623154e748a0d75ff498802a720aeec27a6.tar.gz
openembedded-core-contrib-946b6623154e748a0d75ff498802a720aeec27a6.tar.bz2
openembedded-core-contrib-946b6623154e748a0d75ff498802a720aeec27a6.zip
externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths
If these are set to URLs then the errors produced are not helpful. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/externalsrc.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index d64af6a9c9..529be49a2b 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -29,6 +29,12 @@ EXTERNALSRC_SYMLINKS ?= "oe-workdir:${WORKDIR} oe-logs:${T}"
python () {
externalsrc = d.getVar('EXTERNALSRC')
+ externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
+
+ if externalsrc and not externalsrc.startswith("/"):
+ bb.error("EXTERNALSRC must be an absolute path")
+ if externalsrcbuild and not externalsrcbuild.startswith("/"):
+ bb.error("EXTERNALSRC_BUILD must be an absolute path")
# 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
@@ -48,7 +54,6 @@ python () {
if externalsrc:
d.setVar('S', externalsrc)
- externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
if externalsrcbuild:
d.setVar('B', externalsrcbuild)
else: