openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: mac@mcrowe.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] Installing licence files for static/header-only libraries into images
Date: Wed, 13 Oct 2021 13:32:03 -0700	[thread overview]
Message-ID: <CAMKF1soqvKJyAcTykqAfP1aYtXsPq6FtFo6cUo-mi2-OSqcESg@mail.gmail.com> (raw)
In-Reply-To: <YWbn1yCqxTGskn+s@mcrowe.com>

[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]

On Wed, Oct 13, 2021 at 7:06 AM Mike Crowe via lists.openembedded.org <mac=
mcrowe.com@lists.openembedded.org> wrote:

> We're using:
>
>  EXTRA_IMAGE_FEATURES += "lic-pkgs"
>
> to install the corresponding licence packages for all the packages
> installed in our image. This works very well for binaries and dynamic
> libraries. However, I've recently noticed that it doesn't install licence
> files for any static or header-only libraries used during the build.
>
> The corresponding -lic packages are built for such packages, but nothing
> causes them to be installed since they are not runtime dependencies of
> anything that is installed.
>
> I thought that I could solve this problem by something like:
>
> def lic_deps(d):
>     deps = []
>     for f in d.getVar('DEPENDS').split():
>         if not f.endswith("-native") and not f.startswith("virtual/"):
>             deps.append(f + "-lic")
>     return ' '.join(deps)


It will work but in some cases it will be do more than what’s needed
Build time dependencies are not necessarily also runtime dependencies eg it
could be using a tool from that package during build

>
>
> RDEPENDS_${PN}-lic += "${@lic_deps(d)}"
>
> but this fails for recipes that use PROVIDES or other shenanigans which
> means that just appending -lic to whatever is in DEPENDS is insufficient.
>
> For the time being I can add the required packages by hand, but this is
> brittle in the longer term.
>
> Is there a better way to solve this problem?
>
> Thanks.
>
> Mike.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#156909):
> https://lists.openembedded.org/g/openembedded-core/message/156909
> Mute This Topic: https://lists.openembedded.org/mt/86288556/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 3153 bytes --]

  reply	other threads:[~2021-10-13 20:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 14:06 Installing licence files for static/header-only libraries into images Mike Crowe
2021-10-13 20:32 ` Khem Raj [this message]
2021-10-14 16:51   ` [OE-core] " 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=CAMKF1soqvKJyAcTykqAfP1aYtXsPq6FtFo6cUo-mi2-OSqcESg@mail.gmail.com \
    --to=raj.khem@gmail.com \
    --cc=mac@mcrowe.com \
    --cc=openembedded-core@lists.openembedded.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;
as well as URLs for NNTP newsgroup(s).