Working in an environment with license restrictions is always a bit challenging.
Recently while migrating a larger code base I encountered the following error message
1 | Package gawk cannot be installed into the image because it has incompatible license(s): GPL-3.0 |
hummmm, where is that actually coming from? - a quick grep through my image recipes didn't reveal anything, so it has to be something pulled in by one of the packages or even further down the line.
All the package data is available in a human readable format within your workspace, still it's hard to track the relations for the above mentioned issues...
So I decided to write a small script which turns this into small and way better understandable trees in the console...
Et voila, I present to you dot2tree, a small script which can turn different bitbake related sources into tree printouts in your console.
Let's give it a try with the above shown error.
As we all know, bitbake/poky creates an image manifest, which holds the information about all the packages installed to an image, plus we know where we want to end our search (in this case gawk).
(just to be clear all the script does is to create a tree and print the branches between root and end node, so in this case our image manifest provides the root node(s) and the gawk the where we want to end our search)
As we all know, bitbake/poky creates an image manifest, which holds the information about all the packages installed to an image, plus we know where we want to end our search (in this case gawk).
(just to be clear all the script does is to create a tree and print the branches between root and end node, so in this case our image manifest provides the root node(s) and the gawk the where we want to end our search)
1 2 3 4 5 6 7 8 9 10 11 12 | ./dot2tree --mode=pkgdepend build/tmp/deploy/licenses/core-image-foo/package.manifest gawk build/tmp/pkgdata/foo/runtime-reverse packagegroup-core-full-cmdline ├── packagegroup-core-full-cmdline-utils │ └── gawk └── packagegroup-core-full-cmdline-initscripts └── syslog-ng └── gawk packagegroup-foo-core └── syslog-ng └── gawk syslog-ng └── gawk |
so that is information I can work with - a quick jump into the syslog-ng recipe revealed that some (more or less optional scripts) are using awk as an interpreter... I just removed them via an
1 2 3 | do_install_append() { find ${D} -name "*.awk" -type f -exec rm -f {} \; } |
as was as gawk-free as I could be😁 (and was able to assemble my above mentioned image, totally compliant in terms of licensing)
The script is freely available to anyone of you in case you're facing similar problems.
Kommentare
Kommentar veröffentlichen