openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* Installing licence files for static/header-only libraries into images
@ 2021-10-13 14:06 Mike Crowe
  2021-10-13 20:32 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Crowe @ 2021-10-13 14:06 UTC (permalink / raw)
  To: openembedded-core

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)

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-14 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 14:06 Installing licence files for static/header-only libraries into images Mike Crowe
2021-10-13 20:32 ` [OE-core] " Khem Raj
2021-10-14 16:51   ` Mike Crowe

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).