Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Mike Looijmans <mike.looijmans@topic.nl>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/3] insane.bbclass: show PN and relative path in package_qa_check_host_user
Date: Fri, 18 Sep 2015 17:13:44 +0200	[thread overview]
Message-ID: <20150918151344.GA2385@jama> (raw)
In-Reply-To: <55FC149B.80800@topic.nl>

[-- Attachment #1: Type: text/plain, Size: 2780 bytes --]

On Fri, Sep 18, 2015 at 03:41:47PM +0200, Mike Looijmans wrote:
> On 18-09-15 15:14, Martin Jansa wrote:
> > * 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..a35e546 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)
> 
> I think "$s" is a typo (that will lead to a Python exception).

You're right, but doesn't lead to python exception here

even the pn was printed out in my test build with this, e.g.:

NOTE: recipe e-wm-0.18.8-r0: task do_package_qa: Started
WARNING: QA Issue: e-wm: /e-wm-dbg/usr/src/debug/e-wm/0.18.8-r0/build/src/bin/e_fm_shared_types.h is owned by uid 1026, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
NOTE: recipe e-wm-0.18.8-r0: task do_package_qa: Succeeded

But v2 comming with %s. Thanks

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

  reply	other threads:[~2015-09-18 15:13 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 [this message]
2015-09-18 15:15     ` [PATCHv2 " Martin Jansa
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=20150918151344.GA2385@jama \
    --to=martin.jansa@gmail.com \
    --cc=mike.looijmans@topic.nl \
    --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