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:53:58 +0100
commit4de6b898432fc1198a943b32d455e255bde2301b (patch)
treef39d8706c4a0effd87deed09df74498dad34ad06
parent231c9fe94d5b65bea345ffe9eb5e68b0db11cb07 (diff)
downloadpoky-4de6b898432fc1198a943b32d455e255bde2301b.tar.gz
externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths
If these are set to URLs then the errors produced are not helpful. (From OE-Core rev: 946b6623154e748a0d75ff498802a720aeec27a6) 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}"
29 29
30python () { 30python () {
31 externalsrc = d.getVar('EXTERNALSRC') 31 externalsrc = d.getVar('EXTERNALSRC')
32 externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
33
34 if externalsrc and not externalsrc.startswith("/"):
35 bb.error("EXTERNALSRC must be an absolute path")
36 if externalsrcbuild and not externalsrcbuild.startswith("/"):
37 bb.error("EXTERNALSRC_BUILD must be an absolute path")
32 38
33 # If this is the base recipe and EXTERNALSRC is set for it or any of its 39 # If this is the base recipe and EXTERNALSRC is set for it or any of its
34 # derivatives, then enable BB_DONT_CACHE to force the recipe to always be 40 # derivatives, then enable BB_DONT_CACHE to force the recipe to always be
@@ -48,7 +54,6 @@ python () {
48 54
49 if externalsrc: 55 if externalsrc:
50 d.setVar('S', externalsrc) 56 d.setVar('S', externalsrc)
51 externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
52 if externalsrcbuild: 57 if externalsrcbuild:
53 d.setVar('B', externalsrcbuild) 58 d.setVar('B', externalsrcbuild)
54 else: 59 else: