Installing licence files for static/header-only libraries into images
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.
Quoted 13 lines · Mike Crowe via lists.openembedded.org
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.
Quoted 8 lines
I thought that I could solve this problem by something like:
def
lic_deps(d):
deps = []
for f in d.getVar('DEPENDS').split():
if notf.endswith("-native")and notf.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
Quoted 27 lines
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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 26 lines · Khem Raj
Quoted 13 lines · Mike Crowe via lists.openembedded.org
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.
Quoted 8 lines
I thought that I could solve this problem by something like:
def
lic_deps(d):
deps = []
for f in d.getVar('DEPENDS').split():
if notf.endswith("-native")and notf.startswith("virtual/"):
deps.append(f + "-lic")
return ' '.join(deps)
Quoted 3 lines
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
Yes. I was attempting to avoid that to a certain extent by excluding -native packages.
Quoted 9 lines
Quoted 9 lines
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?
The deficiencies in this solution made me hope that there was a better one. It doesn't sound like there is. :(
Thanks.
Mike.