From: "Denys Dmytriyenko" <denis@denix.org>
To: Martin Jansa <Martin.Jansa@gmail.com>
Cc: openembedded-devel <openembedded-devel@lists.openembedded.org>,
Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
openembedded-commits@lists.openembedded.org,
Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [oe-commits] [openembedded-core] 05/11: license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses
Date: Tue, 30 Mar 2021 17:47:11 -0400 [thread overview]
Message-ID: <20210330214711.GC23013@denix.org> (raw)
In-Reply-To: <CA+chaQeLKzCdXyhPOoZJVxjWS7HG0kOwg3nt90xsJLz8Ov2VxA@mail.gmail.com>
On Tue, Mar 30, 2021 at 10:46:19PM +0200, Martin Jansa wrote:
> On Tue, Jan 28, 2020 at 12:52 PM <git@git.openembedded.org> wrote:
>
> > This is an automated email from the git hooks/post-receive script.
> >
> > rpurdie pushed a commit to branch zeus
> > in repository openembedded-core.
> >
> > commit 5ed714139f91eb03871e01b68a4370784071234d
> > Author: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > AuthorDate: Wed Dec 11 17:48:13 2019 +0100
> >
> > license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses
> >
> > Previously, there was SRC_DISTRIBUTE_LICENSES, an undocumented
> > variable that contained a static list of licenses. It was used by
> > expand_wildcard_licenses() to expand any wildcards used in, e.g.,
> > INCOMPATIBLE_LICENSE. However, since this static list of licenses has
> > not been kept up-to-date, many licenses were missing, with the result
> > that if one tried to use any of those licenses with a wildcard, no
> > licenses would be found, effectively ignoring that they should be
> > marked as incompatible.
> >
> > This introduces a new (documented) variable, AVAILABLE_LICENSES, that
> > is automatically updated to contain all licenses found in any
> > directories specified by ${COMMON_LICENSE_DIR} and ${LICENSE_PATH},
> > and uses it instead of SRC_DISTRIBUTE_LICENSES when expanding
> > wildcards.
> >
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > (cherry picked from commit 8c9ef587fe499c612a878a1ab42092eb79b334ef)
> > Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> > ---
> > meta/classes/license.bbclass | 27
> > ++++++++++++++++++++----
> > meta/conf/documentation.conf | 1 +
> > meta/lib/oeqa/selftest/cases/incompatible_lic.py | 6 +++---
> > 3 files changed, 27 insertions(+), 7 deletions(-)
> >
> ...
>
> > +def available_licenses(d):
> > + """
> > + Return the available licenses by searching the directories specified
> > by
> > + COMMON_LICENSE_DIR and LICENSE_PATH.
> > + """
> > + lic_dirs = ((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' +
> > + (d.getVar('LICENSE_PATH') or '')).split()
> > +
> > + licenses = []
> > + for lic_dir in lic_dirs:
> > + licenses += os.listdir(lic_dir)
> > +
> > + licenses = sorted(licenses)
> > + return licenses
> > +
> > +# Only determine the list of all available licenses once. This assumes
> > that any
> > +# additions to LICENSE_PATH have been done before this file is parsed.
> > +AVAILABLE_LICENSES := "${@' '.join(available_licenses(d))}"
> > +
> >
>
> FWIW this part no longer seems to work correctly, now running:
> yocto-check-layer --dependency /OE/meta-openembedded/meta-oe/
Was it ever fixed?
https://lists.openembedded.org/g/openembedded-core/topic/72389694#141680
--
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964
prev parent reply other threads:[~2021-03-30 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <158021229287.2205.655529513378933058@git.openembedded.org>
[not found] ` <20200128115135.923C8232CB0@git.openembedded.org>
2021-03-30 20:46 ` [oe-commits] [openembedded-core] 05/11: license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses Martin Jansa
2021-03-30 21:47 ` Denys Dmytriyenko [this message]
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=20210330214711.GC23013@denix.org \
--to=denis@denix.org \
--cc=Martin.Jansa@gmail.com \
--cc=openembedded-commits@lists.openembedded.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=openembedded-devel@lists.openembedded.org \
--cc=peter.kjellerstedt@axis.com \
/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