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] [PATCH] license: Drop adding RRECOMMENDS for license packages
Date: Fri, 16 Jul 2021 14:36:33 +0100	[thread overview]
Message-ID: <20210716133633.GA15120@mcrowe.com> (raw)
In-Reply-To: <20210707170607.2698337-1-richard.purdie@linuxfoundation.org>

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.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/classes/license.bbclass | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index f7978e266b6..c87473cbb85 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -63,14 +63,6 @@ def add_package_and_files(d):
>          # first in PACKAGES to be sure that nothing else gets LICENSE_FILES_DIRECTORY
>          d.setVar('PACKAGES', "%s %s" % (pn_lic, packages))
>          d.setVar('FILES_' + pn_lic, files)
> -    for pn in packages.split():
> -        if pn == pn_lic:
> -            continue
> -        rrecommends_pn = d.getVar('RRECOMMENDS_' + pn)
> -        if rrecommends_pn:
> -            d.setVar('RRECOMMENDS_' + pn, "%s %s" % (pn_lic, rrecommends_pn))
> -        else:
> -            d.setVar('RRECOMMENDS_' + pn, "%s" % (pn_lic))
>  
>  def copy_license_files(lic_files_paths, destdir):
>      import shutil
> -- 
> 2.30.2
> 

It turns out that this has an interesting side effect when
IMAGE_FEATURES also contains "dbg-pkgs".

If python3-core is installed in my image then dbg-pkgs causes python3-dbg
to be installed. python3-dbg recommends gdbm-dbg, so libgdbm-dbg also gets
installed.

Prior to this change, libgdbm-dbg recommends gdbm-lic, so libgdbm-lic gets
installed too.

After this change, libgdbm-dbg no longer recommends gdbm-lic and since
libgdbm itself isn't installed and the complementary globs have already
been matched libgdbm-lic is not installed.

(Other recipes that have multiple binary packages with dependencies that
aren't all installed are affected similarly.)

I don't think this really matters in general, and don't propose to change
anything, but it is a surprise if you have a check that goes through the
results of image_list_installed_packages(d) confirming that all the licence
files have been installed and it gets upset that libgdbm-lic isn't there.

Thanks.

Mike.

      parent reply	other threads:[~2021-07-16 13:36 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
2021-07-16 13:36 ` Mike Crowe [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=20210716133633.GA15120@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