> Currently DEPLOY_DIR/licenses is added to SSTATE_ALLOW_OVERLAP_FILES. This > leads to bugs since when one MACHINE_ARCH recipes is cleaned, it removes the > files for another which then results in later build failures as license files > disappear. > > The solution is to include SSTAGE_PKGARCH in the path names to the license > files. > That does mean a search has to be used to find the correct license files for a > given PN but that can be done via SSTATE_ARCHS. > > The implication for other tools is the layout has changed so tools will need > to > adapt to the new paths. The benefit is no more strange build failures such as > from > patterns like: > > MACHINE=qemux86-64 bitbake core-image-minimal > MACHINE=genericx86-64 bitbake core-image-minimal > MACHINE=qemux86-64 bitbake linux-yocto -c clean > MACHINE=genericx86-64 bitbake core-image-minimal -C rootfs > > [YOCTO #14123] > > For anyone finding this commit, I'd question how much people should be > relying on > this code for tooling and suggest the SPDX manifests should be the preferred > data > format going forward anyway. > > Signed-off-by: Richard Purdie <[email protected]> > --- > meta/classes-global/license.bbclass | 2 +- > meta/classes-global/sstate.bbclass | 2 - > meta/classes-recipe/license_image.bbclass | 46 +++++++++++++++++------ > 3 files changed, 35 insertions(+), 15 deletions(-) > > v2 - use reversed order of SSTATE_ARCHS > > diff --git a/meta/classes-global/license.bbclass > b/meta/classes-global/license.bbclass > index 23625f0104f..b2e0d3fabaf 100644 > --- a/meta/classes-global/license.bbclass > +++ b/meta/classes-global/license.bbclass > @@ -29,7 +29,7 @@ python do_populate_lic() { > lic_files_paths = find_license_files(d) > > # The base directory we wrangle licenses to > - destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('PN')) > + destdir = os.path.join(d.getVar('LICSSTATEDIR'), > d.getVar('SSTATE_PKGARCH'), d.getVar('PN')) > copy_license_files(lic_files_paths, destdir) > info = get_recipe_info(d) > with open(os.path.join(destdir, "recipeinfo"), "w") as f:
It looks like an update to do_populate_lic[dirs] was missed here.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192682): https://lists.openembedded.org/g/openembedded-core/message/192682 Mute This Topic: https://lists.openembedded.org/mt/101475771/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
