From edbf8d3999126e3c271a47dada54d1724f59f573 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 15 Apr 2020 16:25:12 +0100 Subject: multilib/recipes: Use new RecipePostKeyExpansion event There are issues with multilib due to the ordering of events where some functions see the remapped multilib dependencies and some do not. A significant problem is that the multilib class needs to make some changes before key expansion and some afterwards but by using existing event handlers, some code sees things in a partially translated state, leading to bugs. This patch changes things to use a new event handler from bitbake which makes the ordering of the changes explcit. The challenge in doing this is that it breaks some existing anonymous python and dyanmic assignments. In some cases these used to be translated and no longer are, meaning MLPREFIX has to be added. In some cases these are now translated and the MLPREFIX can be removed. This change does now make it very clear when MLPREFIX is required and when it is not, its just the migration path which is harder. The patch changes the small number of cases where fixes are needed. In particular, where a variable like RDEPENDS is conditionally extended (e.g. with an override), MLPREFIX is now required. This patch also reverts: base: Revert 'base.bbclass: considering multilib when setting LICENSE_EXCLUSION' This reverts 6597130256a1609c3e05ec5891aceaf549c37985 as the changes to multilib datastore handling mean its no longer necessary. (From OE-Core rev: b3fda056a674889cd9697e779de023d4f993d3ce) Signed-off-by: Richard Purdie --- meta/recipes-core/glibc/glibc-package.inc | 2 +- meta/recipes-core/packagegroups/packagegroup-base.bb | 8 ++++---- meta/recipes-core/psplash/psplash_git.bb | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'meta/recipes-core') diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index aa8e059216..ff25fd4187 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc @@ -24,7 +24,7 @@ libc_baselibs_append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', INSANE_SKIP_${PN}_append_aarch64 = " libdir" FILES_${PN} = "${libc_baselibs} ${libexecdir}/*" -RRECOMMENDS_${PN} = "${@bb.utils.filter('DISTRO_FEATURES', 'ldconfig', d)}" +RRECOMMENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}" FILES_ldconfig = "${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf" FILES_ldd = "${bindir}/ldd" FILES_libsegfault = "${base_libdir}/libSegFault*" diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb index 1f802da09b..90b79adfdc 100644 --- a/meta/recipes-core/packagegroups/packagegroup-base.bb +++ b/meta/recipes-core/packagegroups/packagegroup-base.bb @@ -110,16 +110,16 @@ python __anonymous () { machine_features= set(d.getVar("MACHINE_FEATURES").split()) if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features): - d.setVar("ADD_BT", "packagegroup-base-bluetooth") + d.setVar("ADD_BT", "${MLPREFIX}packagegroup-base-bluetooth") if "wifi" in distro_features and not "wifi" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features): - d.setVar("ADD_WIFI", "packagegroup-base-wifi") + d.setVar("ADD_WIFI", "${MLPREFIX}packagegroup-base-wifi") if "3g" in distro_features and not "3g" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features): - d.setVar("ADD_3G", "packagegroup-base-3g") + d.setVar("ADD_3G", "${MLPREFIX}packagegroup-base-3g") if "nfc" in distro_features and not "nfc" in machine_features and ("usbhost" in machine_features): - d.setVar("ADD_NFC", "packagegroup-base-nfc") + d.setVar("ADD_NFC", "${MLPREFIX}packagegroup-base-nfc") } # diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 22c71f099b..44f0007daf 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb @@ -22,6 +22,7 @@ SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default" python __anonymous() { oldpkgs = d.getVar("PACKAGES").split() splashfiles = d.getVar('SPLASH_IMAGES').split() + mlprefix = d.getVar('MLPREFIX') or '' pkgs = [] localpaths = [] for uri in splashfiles: @@ -46,9 +47,9 @@ python __anonymous() { # Set these so that we have less work to do in do_compile and do_install_append d.setVar("SPLASH_INSTALL", " ".join(pkgs)) d.setVar("SPLASH_LOCALPATHS", " ".join(localpaths)) + for p in pkgs: + d.prependVar("PACKAGES", "%s%s " % (mlprefix, p)) - d.prependVar("PACKAGES", "%s " % (" ".join(pkgs))) - mlprefix = d.getVar('MLPREFIX') or '' pn = d.getVar('PN') or '' for p in pkgs: ep = '%s%s' % (mlprefix, p) -- cgit v1.2.3-54-g00ecf