All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS
@ 2017-08-25  6:43 Jose Alarcon
  2017-08-25 12:29 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Alarcon @ 2017-08-25  6:43 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 class adds an extra check to surface any unsatisfied
recommendation  as WARNINGS to the build output.

Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
---
 meta/classes/rootfs-check-recommends.bbclass | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta/classes/rootfs-check-recommends.bbclass

diff --git a/meta/classes/rootfs-check-recommends.bbclass b/meta/classes/rootfs-check-recommends.bbclass
new file mode 100644
index 0000000..351e438
--- /dev/null
+++ b/meta/classes/rootfs-check-recommends.bbclass
@@ -0,0 +1,21 @@
+#
+# This bbclass adds an extra check to surface any unsatisfied
+# recommendation (RRECOMMENDS) as WARNINGS to the build output.
+#
+# To enable, use INHERIT in conf/distro/distro.conf:
+#
+#       INHERIT += "rootfs-check-recommends"
+#
+
+python 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))
+}
+
+do_rootfs[postfuncs] += "log_check_recommends "
-- 
2.10.1



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

* Re: [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS
  2017-08-25  6:43 [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS Jose Alarcon
@ 2017-08-25 12:29 ` Richard Purdie
  2017-08-26 11:27   ` EXT: " Jose Alarcon
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2017-08-25 12:29 UTC (permalink / raw)
  To: Jose Alarcon, openembedded-core

On Fri, 2017-08-25 at 09:43 +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 class adds an extra check to surface any unsatisfied
> recommendation  as WARNINGS to the build output.
> 
> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
> ---
>  meta/classes/rootfs-check-recommends.bbclass | 21
> +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 meta/classes/rootfs-check-recommends.bbclass

This looks like it would be a better fit for rootfs-
postcommands.bbclass?

We want to try and avoid too many classes if we can help it.

Cheers,

Richard


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

* Re: EXT: Re: [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS
  2017-08-25 12:29 ` Richard Purdie
@ 2017-08-26 11:27   ` Jose Alarcon
  2017-08-29  6:44     ` Jose Alarcon
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Alarcon @ 2017-08-26 11:27 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core



On 25.08.2017 15:29, Richard Purdie wrote:
> On Fri, 2017-08-25 at 09:43 +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 class adds an extra check to surface any unsatisfied
>> recommendation  as WARNINGS to the build output.
>>
>> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
>> ---
>>  meta/classes/rootfs-check-recommends.bbclass | 21
>> +++++++++++++++++++++
>>  1 file changed, 21 insertions(+)
>>  create mode 100644 meta/classes/rootfs-check-recommends.bbclass
> This looks like it would be a better fit for rootfs-
> postcommands.bbclass?

Thanks. I sent a new patch with this check done in rootfs-postcommands
class.

Cheers,

--
Jose


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

* Re: EXT: Re: [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS
  2017-08-26 11:27   ` EXT: " Jose Alarcon
@ 2017-08-29  6:44     ` Jose Alarcon
  0 siblings, 0 replies; 4+ messages in thread
From: Jose Alarcon @ 2017-08-29  6:44 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core



On 26.08.2017 14:27, Jose Alarcon wrote:
>
> On 25.08.2017 15:29, Richard Purdie wrote:
>> On Fri, 2017-08-25 at 09:43 +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 class adds an extra check to surface any unsatisfied
>>> recommendation  as WARNINGS to the build output.
>>>
>>> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
>>> ---
>>>  meta/classes/rootfs-check-recommends.bbclass | 21
>>> +++++++++++++++++++++
>>>  1 file changed, 21 insertions(+)
>>>  create mode 100644 meta/classes/rootfs-check-recommends.bbclass
>> This looks like it would be a better fit for rootfs-
>> postcommands.bbclass?
> Thanks. I sent a new patch with this check done in rootfs-postcommands
> class.

New patch with the check done in rootfs-postcommands here:
https://patchwork.openembedded.org/series/8521/#

The reason why I implemented this as a class in the first place was that
we don't want to modify upstream layers and there is no way to append a
bbclass.
So I created a new class in our own layer instead. But for upstreaming
it is true that rootfs-postcommands is a better fit.

Thanks,

--
Jose


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

end of thread, other threads:[~2017-08-29  6:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25  6:43 [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS Jose Alarcon
2017-08-25 12:29 ` Richard Purdie
2017-08-26 11:27   ` EXT: " Jose Alarcon
2017-08-29  6:44     ` 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.