Skip to contentSkip to conversation

nativesdk/crosssdk: Fix DISTRO_FEATURES_BACKFILL handling

PATCH New Richard Purdie 1 participant 3 messages Feb 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 nativesdk/crosssdk: Fix DISTRO_FEATURES_BACKFILL handling

Similar to native, backfilling of items from DISTRO_FEATURES when combined with DISTRO_FEATURES_FILTER_NATIVESDK was not functioning correctly.

Ensure the backfill is applied before filtering, then clear the value to prevent further backfill. This makes the nativesdk and crosssdk cases match the native code.

---
 meta/classes-recipe/crosssdk.bbclass  | 2 ++
 meta/classes-recipe/nativesdk.bbclass | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
meta/classes-recipe/crosssdk.bbclass +2 -0
index 3541c2c393d..a2853e6a920 100644
@@ -19,8 +19,10 @@ python () {
     # Set features here to prevent appends and distro features backfill
     # from modifying nativesdk distro features
     features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
+    oe.utils.features_backfill("DISTRO_FEATURES", d)
     filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split())
     d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
+    d.setVar("DISTRO_FEATURES_BACKFILL", "")
 }
 
 STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
meta/classes-recipe/nativesdk.bbclass +2 -1
index c2e53c8450a..4404a18856a 100644
@@ -17,7 +17,6 @@ CLASSOVERRIDE = "class-nativesdk"
 MACHINEOVERRIDES = ""
 
 MACHINE_FEATURES = "${SDK_MACHINE_FEATURES}"
-DISTRO_FEATURES_BACKFILL = ""
 MACHINE_FEATURES_BACKFILL = ""
 
 MULTILIBS = ""
@@ -85,8 +84,10 @@ python nativesdk_virtclass_handler () {
     # Set features here to prevent appends and distro features backfill
     # from modifying nativesdk distro features
     features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
+    oe.utils.features_backfill("DISTRO_FEATURES", d)
     filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split())
     d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
+    d.setVar("DISTRO_FEATURES_BACKFILL", "")
 
     e.data.setVar("MLPREFIX", "nativesdk-")
     e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN").replace("-nativesdk", "").replace("nativesdk-", ""))
#1 lore raw

PATCH 2/3 binutils: Drop unneeded and problematic vardeps explict value and immediate expansion

This was introduced in 0788cf349fe37ef4a36c626dbc396c97d1ab14d7 as a way of tracking the EXTRA_OECONF changes. These should be tracked reliably by the contains() code now so it is assumed this was working around a bug at the time. I checked the current task hashes and that information is there.

Therefore drop this bit of code as the immediate expansion causes inaccurate values.

---
 meta/recipes-devtools/binutils/binutils.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +0 -2
index 00b13012585..b3d0728e4b2 100644
@@ -129,8 +129,6 @@ export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
 # to unset LD_LIBRARY_PATH.
 export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}"
 
-MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}"
-do_configure[vardeps] += "MULTIARCH"
 do_configure () {
 	(cd ${S} && gnu-configize)
 
#2 lore raw

PATCH 3/3 conf/distro: Drop default-versions.inc

In reply to Richard Purdie

This conf file used to be useful when we had multiple versions of recipes but we no longer do that and the file is empty. Remove it as obsolete and not needed anymore.

---
 meta/conf/distro/defaultsetup.conf            | 1 -
 meta/conf/distro/include/default-versions.inc | 3 ---
 2 files changed, 4 deletions(-)
 delete mode 100644 meta/conf/distro/include/default-versions.inc
meta/conf/distro/defaultsetup.conf +0 -1
index e1024528e4e..c6be00e80cf 100644
@@ -1,5 +1,4 @@
 include conf/distro/include/default-providers.inc
-include conf/distro/include/default-versions.inc
 include conf/distro/include/default-distrovars.inc
 include_all conf/distro/include/maintainers.inc
 include conf/distro/include/time64.inc
meta/conf/distro/include/default-versions.inc deleted +0 -3
deleted file mode 100644
index a88b65a74ce..00000000000
@@ -1,3 +0,0 @@
-#
-# Default preferred versions
-#