All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] rootfs-postcommands: remove empty line
@ 2017-08-26 11:26 Jose Alarcon
  2017-08-26 11:26 ` [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS Jose Alarcon
  0 siblings, 1 reply; 7+ messages in thread
From: Jose Alarcon @ 2017-08-26 11:26 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
---
 meta/classes/rootfs-postcommands.bbclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index e7999d4..fb36bad 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -291,7 +291,6 @@ rootfs_sysroot_relativelinks () {
 	sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
 }
 
-
 # Generated test data json file
 python write_image_test_data() {
     from oe.data import export2json
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
  2017-08-26 11:26 [PATCH 1/2] rootfs-postcommands: remove empty line Jose Alarcon
@ 2017-08-26 11:26 ` Jose Alarcon
  2017-09-01  6:38   ` Jose Alarcon
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jose Alarcon @ 2017-08-26 11:26 UTC (permalink / raw)
  To: openembedded-core

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_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))
+}
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
  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 11:46   ` Richard Purdie
  2 siblings, 0 replies; 7+ messages in thread
From: Jose Alarcon @ 2017-09-01  6:38 UTC (permalink / raw)
  To: openembedded-core, Richard Purdie



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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
  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
  2 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2017-09-02  0:22 UTC (permalink / raw)
  To: Jose Alarcon; +Cc: OE-core

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

On 26 August 2017 at 12:26, Jose Alarcon <jose.alarcon@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 when
> "debug-tweaks" is enabled.
>

But isn't that the point of recommends?

If the user uses BAD_RECOMMENDATIONS to explicitly stop specific
recommendations being installed, or the package just isn't available,
that's fine.

Ross

[-- Attachment #2: Type: text/html, Size: 968 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: EXT: Re: [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
  2017-09-02  0:22   ` Burton, Ross
@ 2017-09-02  9:42     ` Jose Alarcon
  0 siblings, 0 replies; 7+ messages in thread
From: Jose Alarcon @ 2017-09-02  9:42 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core



On 02.09.2017 03:22, Burton, Ross wrote:
> On 26 August 2017 at 12:26, Jose Alarcon <jose.alarcon@ge.com
> <mailto:jose.alarcon@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 when
>     "debug-tweaks" is enabled.
>
>
> But isn't that the point of recommends?
>
> If the user uses BAD_RECOMMENDATIONS to explicitly stop specific
> recommendations being installed, or the package just isn't available,
> that's fine.

Yes. The purpose of this patch is to surface those unsatisfied
recommends. The user then can decide whether to use BAD_RECOMMENDATIONS,
satisfy the recommend if it is something he needs or just ignore them.

Thanks,

--
Jose


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
  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 11:46   ` Richard Purdie
  2017-09-04  5:13     ` EXT: " Jose Alarcon
  2 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2017-09-02 11:46 UTC (permalink / raw)
  To: Jose Alarcon, openembedded-core

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
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: EXT: Re: [PATCH 2/2] rootfs-postcommands: add test for unsatisfied RRECOMMENDS
  2017-09-02 11:46   ` Richard Purdie
@ 2017-09-04  5:13     ` Jose Alarcon
  0 siblings, 0 replies; 7+ messages in thread
From: Jose Alarcon @ 2017-09-04  5:13 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core



On 02.09.2017 14:46, Richard Purdie wrote:
> 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.

Thanks for your feedback! v2 sent.

Cheers,

--
Jose


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-04  5:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-09-04  5:13     ` EXT: " Jose Alarcon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.