From: Mike Crowe <mac@mcrowe.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v3 2/2] license: Allow treating missing license as error
Date: Thu, 14 Oct 2021 18:09:27 +0100 [thread overview]
Message-ID: <YWhkR02QRrR8ubaE@mcrowe.com> (raw)
In-Reply-To: <ba53cc97609bb6c79f513756760292a80e08612d.camel@linuxfoundation.org>
On Thursday 14 October 2021 at 17:54:18 +0100, Richard Purdie wrote:
> On Thu, 2021-10-14 at 17:42 +0100, Mike Crowe via lists.openembedded.org wrote:
> > On Wednesday 13 October 2021 at 11:48:05 +0100, Mike Crowe wrote:
> > > Use the same WARN_WA and ERROR_QA variables as insane.bbclass to allow
> > > individual recipes, the distro or other configuration to determine
> > > whether a missing licence should be treated as a warning (as it is now)
> > > or as an error.
> > >
> > > oe.qa.handle_error isn't immediately fatal, so track the overall sanity
> > > state and call bb.fatal if required at the end to ensure that the task
> > > really fails. If only bb.error is used then do_populate_lic isn't re-run
> > > on subsequent builds which could lead to the error being missed.
> > >
> > > It seems odd for the license- error classes to be listed in
> > > insane.bbclass but implemented in license.bbclass. All recommendations
> > > for somewhere else to put them gratefully received.
[snip]
> > Patch series v4 coming soon.
>
> I did have to rework it a bit as I also ran into a few issues and was just
> trying to get around to writing them up.
>
> I added:
>
> http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=master-next&id=9e980f1a71e8b6af5ff6da9b02fac0f8bfd9d4fb
>
> which means you can drop the imports.
>
> You can use the nonlocal option to help the "sane" problem:
>
> http://git.yoctoproject.org/cgit.cgi/poky/diff/meta/classes/license.bbclass?h=master-next&id=110fa545ac84e560691c7d9e0d1e6e8f70c66980
>
> The autobuilder also shows issues as some of the functions you moved are
> referenced in other classes. The patch became:
>
> http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=master-next&id=110fa545ac84e560691c7d9e0d1e6e8f70c66980
Thanks for doing that. I thought I'd searched for other occurrences, but I
must have not done so properly. :(
> I was also just thinking we should probably add a new function and add calls at
> the end of the tasks like:
>
> oe.qa.exit_if_errors(d)
>
> with a definition similar to:
>
> def exit_if_errors(d):
> qa_sane = d.getVar("QA_SANE")
> if not qa_sane:
> bb.fatal("Fatal QA errors were found.")
>
> and then renaming QA_SANE to something like QA_FATAL_ERRORS and exitting if set.
That sounds like it would neaten things up greatly and avoid the risk of
accidentally failing to make the error fatal. It ought to mean that many of the sane local
variables can be removed too.
Would you like me to provide new versions of the existing patches or add
new patches on top of the ones already in master-next?
Thanks.
Mike.
next prev parent reply other threads:[~2021-10-14 17:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 10:48 [PATCH v3 1/2] lib/oe/qa,insane: Extra error handling functions to library Mike Crowe
2021-10-13 10:48 ` [PATCH v3 2/2] license: Allow treating missing license as error Mike Crowe
2021-10-14 16:42 ` Mike Crowe
2021-10-14 16:54 ` [OE-core] " Richard Purdie
2021-10-14 17:09 ` Mike Crowe [this message]
2021-10-14 20:14 ` Richard Purdie
2021-10-14 21:48 ` Richard Purdie
2021-10-15 11:04 ` Mike Crowe
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=YWhkR02QRrR8ubaE@mcrowe.com \
--to=mac@mcrowe.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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