Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv2 1/3] insane.bbclass: show PN and relative path in package_qa_check_host_user
Date: Fri, 18 Sep 2015 17:15:22 +0200	[thread overview]
Message-ID: <1442589322-12110-1-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <55FC149B.80800@topic.nl>

* 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>
---
 meta/classes/insane.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5c8629a..c984fae 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
 
-- 
2.5.1



  parent reply	other threads:[~2015-09-18 15:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 11:54 State of bitbake world, Failed tasks 2015-09-13 Martin Jansa
2015-09-18 13:14 ` [PATCH 1/3] insane.bbclass: show PN and relative path in package_qa_check_host_user Martin Jansa
2015-09-18 13:14   ` [PATCH 2/3] insane.bbclass: drop extra line-feed in pkgname check Martin Jansa
2015-09-18 13:14   ` [PATCH 3/3] package.bbclass: add summary line to installed-vs-shipped QA check Martin Jansa
2015-09-18 19:29     ` Christopher Larson
2015-09-18 13:41   ` [PATCH 1/3] insane.bbclass: show PN and relative path in package_qa_check_host_user Mike Looijmans
2015-09-18 15:13     ` Martin Jansa
2015-09-18 15:15     ` Martin Jansa [this message]
2015-09-18 18:22 ` State of bitbake world, Failed tasks 2015-09-13 akuster808
2015-09-23 11:39 ` Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442589322-12110-1-git-send-email-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox