summaryrefslogtreecommitdiffstats
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:51:41 +0100
commit3898d081abe0ee1a8e96d8728c6e0920509c1447 (patch)
tree3b790f6b15b9806d4441052018824f817c3a3b2a /meta/classes
parent13a86cb33d3b348bf4173527683f2c782d7ad968 (diff)
downloadpoky-3898d081abe0ee1a8e96d8728c6e0920509c1447.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. (From OE-Core rev: 719d44305508c75a9f2decacdff6558ca14277bb) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
100 testmsg = "" 100 testmsg = ""
101 if sstate_dir != "": 101 if sstate_dir != "":
102 testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR") 102 testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
103 # If we don't have permissions to SSTATE_DIR, suggest the user set it as an SSTATE_MIRRORS
104 try:
105 err = testmsg.split(': ')[1].strip()
106 if err == "Permission denied.":
107 testmsg = testmsg + "You could try using %s in SSTATE_MIRRORS rather than as an SSTATE_CACHE.\n" % (sstate_dir)
108 except IndexError:
109 pass
103 return testmsg 110 return testmsg
104 111
105def check_sanity_tmpdir_change(tmpdir, data): 112def check_sanity_tmpdir_change(tmpdir, data):