[oe-commits] [openembedded-core] 31/39: native.bbclass: Use fixed DISTRO_FEATURES
git at git.openembedded.org
git at git.openembedded.org
Fri Apr 7 16:47:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit be2d8a81bb2df7b637f484b8c0ea12f15c7b1e0c
Author: Jussi Kukkonen <jussi.kukkonen at intel.com>
AuthorDate: Fri Apr 7 09:09:36 2017 +0300
native.bbclass: Use fixed DISTRO_FEATURES
There seems to be no advantage to letting distro features affect
native builds. There is a significant disadvantage: a change to
DISTRO_FEATURES will trigger a lot of unnecessary native tasks. In a
test like this:
$ bitbake core-image-minimal
# append " systemd" to DISTRO_FEATURES
$ bitbake core-image-minimal
The latter build takes 44 minutes (28%) of cpu-time less with this
patch (skipping 135 native tasks). Sadly wall clock time was not
affected as glibc remains the bottleneck.
Set DISTRO_FEATURES to a fixed value for native recipes to avoid the
unnecessary tasks: currently the default value is empty.
Do the variable setting in native_virtclass_handler() because otherwise
it could still be overridden by appends and the feature backfilling.
Shuffle the early returns so DISTRO_FEATURES gets set as long as
the packagename ends with "-native".
Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/native.bbclass | 12 ++++++++----
meta/conf/bitbake.conf | 2 ++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 1919fbc..fbca4c6 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -121,14 +121,18 @@ PATH_prepend = "${COREBASE}/scripts/native-intercept:"
SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
python native_virtclass_handler () {
- classextend = e.data.getVar('BBCLASSEXTEND') or ""
- if "native" not in classextend:
- return
-
pn = e.data.getVar("PN")
if not pn.endswith("-native"):
return
+ # Set features here to prevent appends and distro features backfill
+ # from modifying native distro features
+ d.setVar("DISTRO_FEATURES", "${NATIVE_DISTRO_FEATURES}")
+
+ classextend = e.data.getVar('BBCLASSEXTEND') or ""
+ if "native" not in classextend:
+ return
+
def map_dependencies(varname, d, suffix = ""):
if suffix:
varname = varname + "_" + suffix
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5e98d45..78a3470 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -789,6 +789,8 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
EXTRA_IMAGE_FEATURES ??= ""
IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
+NATIVE_DISTRO_FEATURES ?= ""
+
DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data ldconfig"
MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list