python () {
import string, re
+ # Filter default features to allow users to opt out of features they don't
+ # want.
+ oe.utils.filter_default_features("DISTRO_FEATURES", d)
+
# Handle backfilling
- oe.utils.features_backfill("DISTRO_FEATURES", d)
oe.utils.features_backfill("MACHINE_FEATURES", d)
# To add a recipe to the skip list , set:
python () {
# set TUNE_PKGARCH to SDK_ARCH
d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH'))
- # Set features here to prevent appends and distro features backfill
- # from modifying nativesdk distro features
+ # Set features here to prevent DISTRO_FEATURES modifications from affecting
+ # crosssdk distro features
features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
- oe.utils.features_backfill("DISTRO_FEATURES", d)
+ oe.utils.filter_default_features("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", "")
+ d.setVar("DISTRO_FEATURES_DEFAULTS", "")
}
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
return
bpn = d.getVar("BPN")
- # Set features here to prevent appends and distro features backfill
- # from modifying native distro features
+ # Set features here to prevent DISTRO_FEATURES modifications from affecting
+ # native distro features
features = set(d.getVar("DISTRO_FEATURES_NATIVE").split())
- oe.utils.features_backfill("DISTRO_FEATURES", d)
+ oe.utils.filter_default_features("DISTRO_FEATURES", d)
filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVE"), d).split())
d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
- d.setVar("DISTRO_FEATURES_BACKFILL", "")
+ d.setVar("DISTRO_FEATURES_DEFAULTS", "")
classextend = d.getVar('BBCLASSEXTEND') or ""
if "native" not in classextend:
if not (pn.endswith("-nativesdk") or pn.startswith("nativesdk-")):
return
- # Set features here to prevent appends and distro features backfill
- # from modifying nativesdk distro features
+ # Set features here to prevent DISTRO_FEATURES modifications from affecting
+ # nativesdk distro features
features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
- oe.utils.features_backfill("DISTRO_FEATURES", d)
+ oe.utils.filter_default_features("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", "")
+ d.setVar("DISTRO_FEATURES_DEFAULTS", "")
e.data.setVar("MLPREFIX", "nativesdk-")
e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN").replace("-nativesdk", "").replace("nativesdk-", ""))
DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opencl opengl wayland"
DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opencl opengl wayland"
-DISTRO_FEATURES_BACKFILL = "pulseaudio gobject-introspection-data ldconfig opengl ptest multiarch wayland vulkan"
MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
LOCALE_UTF8_IS_DEFAULT:class-nativesdk = "0"
# seccomp is not yet ported to rv32
-DISTRO_FEATURES_DEFAULT:remove:riscv32 = "seccomp"
+DISTRO_FEATURES_OPTED_OUT:append:riscv32 = "seccomp"
# seccomp is not yet ported to ARC
-DISTRO_FEATURES_DEFAULT:remove:arc = "seccomp"
+DISTRO_FEATURES_OPTED_OUT:append:arc = "seccomp"
# seccomp is not yet ported to microblaze
-DISTRO_FEATURES_DEFAULT:remove:microblaze = "seccomp"
+DISTRO_FEATURES_OPTED_OUT:append:microblaze = "seccomp"
# seccomp is not yet ported to loongarch64
-DISTRO_FEATURES_DEFAULT:remove:loongarch64 = "seccomp"
+DISTRO_FEATURES_OPTED_OUT:append:loongarch64 = "seccomp"
-DISTRO_FEATURES_DEFAULT ?= "acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp"
-DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}"
+DISTRO_FEATURES_DEFAULTS ?= " \
+ acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost \
+ wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp pulseaudio \
+ gobject-introspection-data ldconfig opengl ptest multiarch wayland vulkan \
+ "
IMAGE_FEATURES ?= ""
COMMERCIAL_AUDIO_PLUGINS ?= ""
PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
+DISTRO_FEATURES_OPTED_OUT += "ldconfig"
#USE_NLS ?= "no"
PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
+DISTRO_FEATURES_OPTED_OUT += "ldconfig"
#USE_NLS ?= "no"
PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
+DISTRO_FEATURES_OPTED_OUT += "ldconfig"
IMAGE_LINGUAS = ""
DISTRO_EXTRA_RDEPENDS[doc] = "Specifies a list of distro-specific packages to add to all images. The variable only applies to the images that include packagegroup-base."
DISTRO_EXTRA_RRECOMMENDS[doc] = "Specifies a list of distro-specific packages to add to all images if the packages exist. The list of packages are automatically installed but you can remove them."
DISTRO_FEATURES[doc] = "The features enabled for the distribution."
-DISTRO_FEATURES_BACKFILL[doc] = "Features to be added to DISTRO_FEATURES if not also present in DISTRO_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and it is not intended to be user-configurable."
-DISTRO_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from DISTRO_FEATURES_BACKFILL that should not be backfilled (i.e. added to DISTRO_FEATURES) during the build."
+DISTRO_FEATURES_DEFAULTS[doc] = "The default set of distribution features, prior to any filtering. Usually you should leave this alone and modify DISTRO_FEATURES and/or DISTRO_FEATURES_OPTED_OUT."
+DISTRO_FEATURES_OPTED_OUT[doc] = "The set of default distribtion features to disable. Prefer opting out of features using this variable instead of using DISTRO_FEATURES:remove."
DISTRO_NAME[doc] = "The long name of the distribution."
DISTRO_PN_ALIAS[doc] = "Alias names used for the recipe in various Linux distributions."
DISTRO_VERSION[doc] = "The version of the distribution."