]> code.ossystems Code Review - openembedded-core.git/commitdiff
externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths
authorRoss Burton <ross.burton@intel.com>
Tue, 13 Jun 2017 16:44:54 +0000 (17:44 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Jun 2017 13:45:00 +0000 (14:45 +0100)
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>
meta/classes/externalsrc.bbclass

index d64af6a9c9ad15df59ebda9f918593d7f7b1e179..529be49a2bc838dfbe5702b1feea1073652fa1a6 100644 (file)
@@ -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: