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

Jose Alarcon jose.alarcon at ge.com
Fri Sep 1 06:38:50 UTC 2017



On 26.08.2017 14:26, 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 at ge.com>

Hello,

Gentle reminder, has anyone have a chance to review this patch?

Thanks,

--
Jose Alarcon

> ---
>  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_FEATURES", "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
> @@ -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))
> +}




More information about the Openembedded-core mailing list