[OE-core] [PATCH v2 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS

Khem Raj raj.khem at gmail.com
Mon Sep 4 20:10:40 UTC 2017


On Sun, Sep 3, 2017 at 10:12 PM, Jose Alarcon <jose.alarcon at ge.com> 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.
>

I think a note is more appropriate here.

> Enable this check with:
> ROOTFS_POSTPROCESS_COMMAND += "rootfs_log_check_recommends;"
>
> Signed-off-by: Jose Alarcon <jose.alarcon at ge.com>
> ---
>  meta/classes/rootfs-postcommands.bbclass | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
> index fb36bad..f6d31a0 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -307,3 +307,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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list