aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2015-09-18 17:15:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-21 15:39:33 +0100
commit39b1bca459d52b58ca055604b5012d9a411e3a59 (patch)
tree7fc1fe1f4323c11505986c8f7921fe8592bada4b
parent32412ac530bcf286980a6f9c7367df4944dd603a (diff)
downloadopenembedded-core-contrib-39b1bca459d52b58ca055604b5012d9a411e3a59.tar.gz
insane.bbclass: show PN and relative path in package_qa_check_host_user
* show PN as other QA checks * strip PKGDEST prefix from shown path as other QA checks Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/insane.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5c8629af1d..c984faec71 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -980,6 +980,7 @@ def package_qa_check_host_user(path, name, d, elf, messages):
return
dest = d.getVar('PKGDEST', True)
+ pn = d.getVar('PN', True)
home = os.path.join(dest, 'home')
if path == home or path.startswith(home + os.sep):
return
@@ -991,14 +992,15 @@ def package_qa_check_host_user(path, name, d, elf, messages):
if exc.errno != errno.ENOENT:
raise
else:
+ rootfs_path = path[len(dest):]
check_uid = int(d.getVar('HOST_USER_UID', True))
if stat.st_uid == check_uid:
- messages["host-user-contaminated"] = "%s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (path, check_uid)
+ messages["host-user-contaminated"] = "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_uid)
return False
check_gid = int(d.getVar('HOST_USER_GID', True))
if stat.st_gid == check_gid:
- messages["host-user-contaminated"] = "%s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (path, check_gid)
+ messages["host-user-contaminated"] = "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_gid)
return False
return True