From: "Mike Crowe" <yocto@mac.mcrowe.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] license: Drop adding RRECOMMENDS for license packages
Date: Thu, 8 Jul 2021 15:34:38 +0100 [thread overview]
Message-ID: <20210708143438.GA15344@mcrowe.com> (raw)
In-Reply-To: <2302b1a994beea1e8cafb536a123d6ca9d375085.camel@linuxfoundation.org>
On Thursday 08 July 2021 at 09:33:12 +0100, Richard Purdie wrote:
> On Thu, 2021-07-08 at 09:26 +0100, Mike Crowe wrote:
> > On Wednesday 07 July 2021 at 18:06:07 +0100, Richard Purdie wrote:
> > > This changes behaviour when LICENSE_CREATE_PACKAGE is in use. Packages
> > > no longer have RRECOMMENDS adding to them.
> > >
> > > It was highlighted that this doesn't apply to PACKAGES_DYNAMIC, nor can
> > > it easily be made to do so. There is also a much easier way to handle this
> > > which is:
> > >
> > > IMAGE_INSTALL_COMPLEMENTARY += "*-lic"
> > >
> > > which works on a per image basis and doesn't change the underlying
> > > package dependencies. I propose we switch to this instead.
[snip]
> > Since the equivalent for "*-dbg" is to add dbg-pkgs to IMAGE_FEATURES, I
> > think that adding:
> >
> > COMPLEMENTARY_GLOB[lic-pkgs] = "*-lic"
> >
> > to license_image.bbclass is a cleaner solution.
>
> Yes, I like that.
It seems to work well for me.
> > We could make the feature
> > imply LICENSE_CREATE_PACKAGE="1" but it feels strange for an image feature
> > to affect the packages when they are built so perhaps that isn't a good
> > idea.
>
> I agree, I'm not sure that would be too helpful. Maybe a comment next to
> the line above mentioning it needs to be set? We might also be able to
> add a warning if it wasn't set but lic-pkgs was used?
The comment is easy, as is documenting the image feature. If I add
"lic-pkgs" to EXTRA_IMAGE_FEATURES but don't set LICENSE_CREATE_PACKAGE="1"
then there are no errors when building the image. I added:
--8<--
python() {
if not oe.data.typed_value('LICENSE_CREATE_PACKAGE', d):
features = set(oe.data.typed_value('IMAGE_FEATURES', d))
if 'lic-pkgs' in features:
bb.error("'lic-pkgs' in IMAGE_FEATURES but LICENSE_CREATE_PACKAGE not enabled to generate -lic packages")
}
-->8--
to license_image.bbclass which reports the problem, but does so for every
image even if it isn't being built. An alternative would be to add a new
function to ROOTFS_PREPROCESS_COMMAND which does the check at image
creation time.
Do you have a preference, or is there a better way that I've missed?
Thanks.
Mike.
next prev parent reply other threads:[~2021-07-08 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 17:06 [PATCH] license: Drop adding RRECOMMENDS for license packages Richard Purdie
2021-07-08 8:26 ` [OE-core] " Mike Crowe
2021-07-08 8:33 ` Richard Purdie
2021-07-08 14:34 ` Mike Crowe [this message]
2021-07-16 13:36 ` 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=20210708143438.GA15344@mcrowe.com \
--to=yocto@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