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>
This commit is contained in:
Joshua Lock 2012-05-23 16:22:12 -07:00 committed by Richard Purdie
parent 13a86cb33d
commit 3898d081ab
1 changed files with 7 additions and 0 deletions

View File

@ -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):