diff options
author | Ross Burton <ross.burton@intel.com> | 2019-07-03 16:01:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-05 12:00:20 +0100 |
commit | 56c9e61f39f1ccf87eac594939a085e64e8877f9 (patch) | |
tree | f3f2d66444886ce7fb29dffa86870bb756a5e860 /meta/classes | |
parent | e005972786ef2481393e93ae3b784c2c3bd44d87 (diff) | |
download | poky-56c9e61f39f1ccf87eac594939a085e64e8877f9.tar.gz |
insane: use clean_path for the host contamination warnings
We've a nice function to clean up absolute build paths for display, so use it.
(From OE-Core rev: c2f2ea87592d14e7020eff19c11aae2fb644358a)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 0695a04438..891d3a8421 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -874,15 +874,14 @@ def package_qa_check_host_user(path, name, d, elf, messages): | |||
874 | if exc.errno != errno.ENOENT: | 874 | if exc.errno != errno.ENOENT: |
875 | raise | 875 | raise |
876 | else: | 876 | else: |
877 | rootfs_path = path[len(dest):] | ||
878 | check_uid = int(d.getVar('HOST_USER_UID')) | 877 | check_uid = int(d.getVar('HOST_USER_UID')) |
879 | if stat.st_uid == check_uid: | 878 | if stat.st_uid == check_uid: |
880 | package_qa_add_message(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)) | 879 | package_qa_add_message(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, package_qa_clean_path(path, d, name), check_uid)) |
881 | return False | 880 | return False |
882 | 881 | ||
883 | check_gid = int(d.getVar('HOST_USER_GID')) | 882 | check_gid = int(d.getVar('HOST_USER_GID')) |
884 | if stat.st_gid == check_gid: | 883 | if stat.st_gid == check_gid: |
885 | package_qa_add_message(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)) | 884 | package_qa_add_message(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, package_qa_clean_path(path, d, name), check_gid)) |
886 | return False | 885 | return False |
887 | return True | 886 | return True |
888 | 887 | ||