Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Jose Alarcon <jose.alarcon@ge.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
Date: Sat, 02 Sep 2017 12:46:28 +0100	[thread overview]
Message-ID: <1504352788.2175.73.camel@linuxfoundation.org> (raw)
In-Reply-To: <20170826112602.15344-2-jose.alarcon@ge.com>

On Sat, 2017-08-26 at 14:26 +0300, Jose Alarcon wrote:
> The do_rootfs log contains a number of unsatisfied package
> recommendations. At the moment those are only visible when
> reviewing the rootfs log.
> 
> This patch adds an extra check to surface any unsatisfied
> recommendation  as WARNINGS to the build output when
> "debug-tweaks" is enabled.
> 
> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
> ---
>  meta/classes/rootfs-postcommands.bbclass | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/meta/classes/rootfs-postcommands.bbclass
> b/meta/classes/rootfs-postcommands.bbclass
> index fb36bad..e7ef382 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -50,6 +50,9 @@ python () {
>      d.appendVar('ROOTFS_POSTPROCESS_COMMAND',
> '${SORT_PASSWD_POSTPROCESS_COMMAND}')
>  }
>  
> +# Enable QA check for unsatisfied recommendations if debug-tweaks is
> enabled
> +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATU
> RES", "debug-tweaks", "rootfs_log_check_recommends; ", "",d)}'
> +
>  systemd_create_users () {
>  	for conffile in
> ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf
> ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
>  		[ -e $conffile ] || continue

Can we just drop the above piece please? I think its fine for the user
to enable this with:

ROOTFS_POSTPROCESS_COMMAND += "rootfs_log_check_recommends"

We're trying to kill off debug-tweaks as nobody can tell what it does
from the name.

Cheers,

Richard

> @@ -307,3 +310,15 @@ python write_image_test_data() {
>             os.remove(testdata_link)
>          os.symlink(os.path.basename(testdata), testdata_link)
>  }
> +
> +# Check for unsatisfied recommendations (RRECOMMENDS)
> +python rootfs_log_check_recommends() {
> +    log_path = d.expand("${T}/log.do_rootfs")
> +    with open(log_path, 'r') as log:
> +        for line in log:
> +            if 'log_check' in line:
> +                continue
> +
> +            if 'unsatisfied recommendation for' in line:
> +                bb.warn('[log_check] %s: %s' % (d.getVar('PN',
> True), line))
> +}
> -- 
> 2.10.1
> 


  parent reply	other threads:[~2017-09-02 11:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-26 11:26 [PATCH 1/2] rootfs-postcommands: remove empty line Jose Alarcon
2017-08-26 11:26 ` [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS Jose Alarcon
2017-09-01  6:38   ` Jose Alarcon
2017-09-02  0:22   ` Burton, Ross
2017-09-02  9:42     ` EXT: " Jose Alarcon
2017-09-02 11:46   ` Richard Purdie [this message]
2017-09-04  5:13     ` Jose Alarcon

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=1504352788.2175.73.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=jose.alarcon@ge.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