Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Mike Crowe" <yocto@mac.mcrowe.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] license.bbclass does not add recommends to dynamic packages
Date: Wed, 7 Jul 2021 14:05:21 +0100	[thread overview]
Message-ID: <20210707130521.GA4032@mcrowe.com> (raw)
In-Reply-To: <f78a557b2ce4df340b55194f551e599bffbe21ae.camel@linuxfoundation.org>

On Wednesday 07 July 2021 at 13:25:17 +0100, Richard Purdie wrote:
> On Wed, 2021-07-07 at 12:53 +0100, Mike Crowe via lists.openembedded.org wrote:
> > We're using LICENSE_CREATE_PACKAGE to create ${PN}-lic package files and
> > relying on the automatically generated recommends to cause them to be
> > installed in the image. This works well for most packages, but fails for
> > packages where we only install package created using PACKAGES_DYNAMIC.
> > 
> > For example, liborc is being installed in our image but that package lacks
> > a recommends for orc-lic, so the licences that apply to it are not being
> > installed. This is because license.bbclass:add_package_and_files iterates
> > only over the packages listed in PACKAGES.
> > 
> > Steps to reproduce on current master:
> > 
> > $ echo 'LICENSE_CREATE_PACKAGE = "1"' >> conf/local.conf
> > $ bitbake orc
> > $ dpkg-deb -I tmp-glibc/deploy/ipk/armv7vet2hf-neon/orc_0.4.32-r0_armv7vet2hf-neon.ipk|grep Recommends
> >  Recommends: orc-lic
> > $ dpkg-deb -I tmp-glibc/deploy/ipk/armv7vet2hf-neon/liborc-0.4-0_0.4.32-r0_armv7vet2hf-neon.ipk|grep Recommends
> > $
> > 
> > (I would have expected the last command to produce the same output as the
> > penultimate one.)
> > 
> > Even if I could fathom out how to fix orc and any other recipes so that they
> > did add the ${PN}-lic dependency, I'd be worried about not noticing that
> > the problem affected other recipes in the future.
> > 
> > Is there a way to teach license.bbclass:add_package_and_files to add the
> > ${PN}-lic recommends for dynamic packages, or would it be necessary to
> > teach package.bbclass to do so?
> 
> That all sounds rather horrible :/.
> 
> Would IMAGE_INSTALL_COMPLEMENTARY += "*-lic" work instead?

That seems to have worked well.

I wonder whether this means that it would be better to stop adding the
recommends automatically and tell users that need this to use
IMAGE_INSTALL_COMPLEMENTARY instead (either directly, or by teaching
license_image.bbclass to modify it based on another variable.)

Losing the recommends would also meaan I wouldn't need to add
--no-recommends to the image recipes that don't need the licence files.

Thanks for the speedy response!

Mike.

  reply	other threads:[~2021-07-07 13:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 11:53 license.bbclass does not add recommends to dynamic packages Mike Crowe
2021-07-07 12:25 ` [OE-core] " Richard Purdie
2021-07-07 13:05   ` Mike Crowe [this message]
2021-07-07 16:43     ` Richard Purdie
     [not found]     ` <168F8FE5ADDC556E.30794@lists.openembedded.org>
2021-07-07 16:48       ` Richard Purdie
2021-07-07 16:55         ` Mike Crowe
2021-07-07 18:14           ` Richard Purdie

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=20210707130521.GA4032@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