]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity: check that path variables don't use ~
authorRoss Burton <ross.burton@intel.com>
Wed, 20 Sep 2017 12:57:33 +0000 (13:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Sep 2017 16:14:42 +0000 (17:14 +0100)
The core path variables (TMPDIR, DL_DIR, SSTATE_DIR) don't use tilde expansion
but if the user does then the errors are very mysterious, so check on startup.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sanity.bbclass

index 91b92ec28a8dfc6a84d50694e3fd2284c49de37c..1feb7949daa6e9f5ab70d216f6985e5cfd8582e7 100644 (file)
@@ -726,6 +726,11 @@ def check_sanity_everybuild(status, d):
         if not ( check_conf_exists("conf/distro/${DISTRO}.conf", d) or check_conf_exists("conf/distro/include/${DISTRO}.inc", d) ):
             status.addresult("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % d.getVar("DISTRO"))
 
+    # Check that these variables don't use tilde-expansion as we don't do that
+    for v in ("TMPDIR", "DL_DIR", "SSTATE_DIR"):
+        if d.getVar(v).startswith("~"):
+            status.addresult("%s uses ~ but Bitbake will not expand this, use an absolute path or variables." % v)
+
     # Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't 
     # set, since so much relies on it being set.
     dldir = d.getVar('DL_DIR')