All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/4] Use fixed DISTRO_FEATURES for native
@ 2017-04-11 10:55 Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 1/4] mkfontdir: Remove x11 requirement for -native Jussi Kukkonen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2017-04-11 10:55 UTC (permalink / raw)
  To: openembedded-core

Avoid signifant native task churn when DISTRO_FEATURES is changed
by defining (almost) fixed DISTRO_FEATURES for native recipes.

The DISTRO_FEATURES_FILTER_NATIVE variable lists the features that do
change based on DISTRO_FEATURES: currently the default value is
"api-documentation".

Changes since V1:
* Add DISTRO_FEATURES_FILTER_NATIVE instead of just a fixed list
* Use DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation": this is
  required for gtk-doc to work (and we don't want to enable it for
  all builds because of extensive dependencies)
* Only remove "x11" from required features for native x font tools:
  otherwise a non-x11 world build fails


Thanks,
 Jussi

The following changes since commit 0793c758b15e5007b4dd4b146987a0e74d6f6cba:

  Revert "staging: Fix sysroot problem with populate_sysroot dependencies on do_fetch" (2017-04-11 00:57:03 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib jku/native-distro-features
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/native-distro-features

Jussi Kukkonen (4):
  mkfontdir: Remove x11 requirement for -native
  mkfontscale: Remove x11 requirement for -native
  xorg-font-common.inc: Remove x11 requirement for -native
  native.bbclass: Use fixed DISTRO_FEATURES

 meta/classes/native.bbclass                          | 13 +++++++++----
 meta/conf/bitbake.conf                               |  4 ++++
 meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb    |  3 +++
 meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb  |  2 ++
 meta/recipes-graphics/xorg-font/xorg-font-common.inc |  1 +
 5 files changed, 19 insertions(+), 4 deletions(-)

-- 
2.1.4



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 1/4] mkfontdir: Remove x11 requirement for -native
  2017-04-11 10:55 [PATCHv2 0/4] Use fixed DISTRO_FEATURES for native Jussi Kukkonen
@ 2017-04-11 10:55 ` Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 2/4] mkfontscale: " Jussi Kukkonen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2017-04-11 10:55 UTC (permalink / raw)
  To: openembedded-core

Make sure we can build native tools without "x11" in features.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb b/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
index a453e24..737bc9d 100644
--- a/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
+++ b/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
@@ -11,6 +11,9 @@ files."
 PE = "1"
 PR = "${INC_PR}.0"
 
+DEPENDS = "util-macros-native"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+
 RDEPENDS_${PN} += "mkfontscale"
 RDEPENDS_${PN}_class-native += "mkfontscale-native"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCHv2 2/4] mkfontscale: Remove x11 requirement for -native
  2017-04-11 10:55 [PATCHv2 0/4] Use fixed DISTRO_FEATURES for native Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 1/4] mkfontdir: Remove x11 requirement for -native Jussi Kukkonen
@ 2017-04-11 10:55 ` Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 3/4] xorg-font-common.inc: " Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 4/4] native.bbclass: Use fixed DISTRO_FEATURES Jussi Kukkonen
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2017-04-11 10:55 UTC (permalink / raw)
  To: openembedded-core

Make sure we can build native tools without "x11" feature.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
index 31cf186..d1aa9b3 100644
--- a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
+++ b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
@@ -10,6 +10,8 @@ is used by the mkfontdir program."
 
 DEPENDS = "util-macros-native zlib libfontenc freetype xproto"
 
+REQUIRED_DISTRO_FEATURES_class-native = ""
+
 BBCLASSEXTEND = "native"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=2e0d129d05305176d1a790e0ac1acb7f"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCHv2 3/4] xorg-font-common.inc: Remove x11 requirement for -native
  2017-04-11 10:55 [PATCHv2 0/4] Use fixed DISTRO_FEATURES for native Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 1/4] mkfontdir: Remove x11 requirement for -native Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 2/4] mkfontscale: " Jussi Kukkonen
@ 2017-04-11 10:55 ` Jussi Kukkonen
  2017-04-11 10:55 ` [PATCHv2 4/4] native.bbclass: Use fixed DISTRO_FEATURES Jussi Kukkonen
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2017-04-11 10:55 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/xorg-font/xorg-font-common.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
index cdbebcf..520c88a 100644
--- a/meta/recipes-graphics/xorg-font/xorg-font-common.inc
+++ b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
@@ -18,6 +18,7 @@ inherit autotools pkgconfig distro_features_check
 
 # The mkfontscale-native requires x11 in DISTRO_FEATURES
 REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES_class-native = ""
 
 EXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCHv2 4/4] native.bbclass: Use fixed DISTRO_FEATURES
  2017-04-11 10:55 [PATCHv2 0/4] Use fixed DISTRO_FEATURES for native Jussi Kukkonen
                   ` (2 preceding siblings ...)
  2017-04-11 10:55 ` [PATCHv2 3/4] xorg-font-common.inc: " Jussi Kukkonen
@ 2017-04-11 10:55 ` Jussi Kukkonen
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2017-04-11 10:55 UTC (permalink / raw)
  To: openembedded-core

There seems to be little 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 native distro features to an intersection of DISTRO_FEATURES and
DISTRO_FEATURES_FILTER_NATIVE (which is defined in bitbake.conf).
Current filter includes only "api-documentation" (as gtk-doc-native
has much less dependencies when built without it)

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@intel.com>
---
 meta/classes/native.bbclass | 13 +++++++++----
 meta/conf/bitbake.conf      |  4 ++++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 1919fbc..225e062 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -121,14 +121,19 @@ 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
+    features = bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVE"), d)
+    d.setVar("DISTRO_FEATURES", 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..c959960 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -789,6 +789,10 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
 EXTRA_IMAGE_FEATURES ??= ""
 IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 
+# Distro features that can affect native recipes (all other features
+# will be removed for the -native case).
+DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation"
+
 DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data ldconfig"
 MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-11 10:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 10:55 [PATCHv2 0/4] Use fixed DISTRO_FEATURES for native Jussi Kukkonen
2017-04-11 10:55 ` [PATCHv2 1/4] mkfontdir: Remove x11 requirement for -native Jussi Kukkonen
2017-04-11 10:55 ` [PATCHv2 2/4] mkfontscale: " Jussi Kukkonen
2017-04-11 10:55 ` [PATCHv2 3/4] xorg-font-common.inc: " Jussi Kukkonen
2017-04-11 10:55 ` [PATCHv2 4/4] native.bbclass: Use fixed DISTRO_FEATURES Jussi Kukkonen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.