aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-05-23 16:22:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-24 08:34:51 +0100
commit719d44305508c75a9f2decacdff6558ca14277bb (patch)
tree7e0d0a7aba0e02a585e07963395e0c27797e5c6a /meta/classes
parent9362702aa9dd82fed7e6d6e3cb1289521b802075 (diff)
downloadopenembedded-core-contrib-719d44305508c75a9f2decacdff6558ca14277bb.tar.gz
sanity.bbclass: add extra information when SSTATE_CACHE unusable
If the user does not have write permissions to SSTATE_CACHE, detected by the check_create_long_filename() test failing with a "Permission denied" value in strerror, then suggest they might want to use the location as an entry in SSTATE_MIRRORS. Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 39da14ba41..25ddfeabb2 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -100,6 +100,13 @@ def check_sanity_sstate_dir_change(sstate_dir, data):
testmsg = ""
if sstate_dir != "":
testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
+ # If we don't have permissions to SSTATE_DIR, suggest the user set it as an SSTATE_MIRRORS
+ try:
+ err = testmsg.split(': ')[1].strip()
+ if err == "Permission denied.":
+ testmsg = testmsg + "You could try using %s in SSTATE_MIRRORS rather than as an SSTATE_CACHE.\n" % (sstate_dir)
+ except IndexError:
+ pass
return testmsg
def check_sanity_tmpdir_change(tmpdir, data):