Skip to contentSkip to conversation

util-linux: replace += with _append to EXTRA_OECONF_virtclass-native

PATCH In review Ming Liu 2 participants 3 messages Jul 17, 2013

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

PATCH 1/1 util-linux: replace += with _append to EXTRA_OECONF_virtclass-native

The native/nativesdk overrides of EXTRA_OECONF should take effect before append operator, otherwise, it will cause EXTRA_OECONF be overridden instead of be appended at native/nativesdk build time.

---
 meta/recipes-core/util-linux/util-linux_2.23.1.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/util-linux/util-linux_2.23.1.bb +2 -2
index 12f5021..e597c41 100644
@@ -18,5 +18,5 @@ SRC_URI[md5sum] = "6741eeaff93ff5a6bacdd3816bdd87c4"
 SRC_URI[sha256sum] = "ad4a7831d7b27d0172996fd343e809716c2403b32a94e15194d8ea797223c4af"
 
 CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
-EXTRA_OECONF_class-native += "--disable-fallocate --disable-use-tty-group"
-EXTRA_OECONF_class-nativesdk += "--disable-fallocate --disable-use-tty-group"
+EXTRA_OECONF_append_virtclass-native = "--disable-fallocate --disable-use-tty-group"
+EXTRA_OECONF_append_virtclass-nativesdk = "--disable-fallocate --disable-use-tty-group"
Signature · 1 line
1.7.1
#1 lore raw
Quoted 4 lines · Ming Liu

The native/nativesdk overrides of EXTRA_OECONF should take effect before append operator, otherwise, it will cause EXTRA_OECONF be overridden instead of be appended at native/nativesdk build time.

I am not sure I understand this one. If what you are saying then all the overrides in recipes need to be changed, that does not seem correct to me.

Please confirm the overrides using += is correct.

Thanks
Sau!

Quoted 18 lines
---
  meta/recipes-core/util-linux/util-linux_2.23.1.bb |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/util-linux/util-linux_2.23.1.bb +2 -2
index 12f5021..e597c41 100644
@@ -18,5 +18,5 @@ SRC_URI[md5sum] = "6741eeaff93ff5a6bacdd3816bdd87c4"
  SRC_URI[sha256sum] = "ad4a7831d7b27d0172996fd343e809716c2403b32a94e15194d8ea797223c4af"
 
  CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
-EXTRA_OECONF_class-native += "--disable-fallocate --disable-use-tty-group"
-EXTRA_OECONF_class-nativesdk += "--disable-fallocate --disable-use-tty-group"
+EXTRA_OECONF_append_virtclass-native = "--disable-fallocate --disable-use-tty-group"
+EXTRA_OECONF_append_virtclass-nativesdk = "--disable-fallocate --disable-use-tty-group"
author
#2 lore raw
Quoted 9 lines · Saul Wold
Quoted 4 lines · Ming Liu

The native/nativesdk overrides of EXTRA_OECONF should take effect before append operator, otherwise, it will cause EXTRA_OECONF be overridden instead of be appended at native/nativesdk build time.

I am not sure I understand this one. If what you are saying then all the overrides in recipes need to be changed, that does not seem correct to me.

Please confirm the overrides using += is correct.

Run 'bitbake -e util-linux-native' to the original, check out the EXTRA_OECONF, we got:
#
# $EXTRA_OECONF [11 operations]
# set conf/bitbake.conf:475
# ""
# _append /buildarea2/mliu3/poky/meta/classes/gettext.bbclass:21
# " ${@gettext_oeconf(d)}"
# set /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:47
# "--libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
# append /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:50
# "${@base_contains('DISTRO_FEATURES', 'systemd', '--enable-socket-activation', '--disable-socket-activation', d)}"
# append /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:51
# "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
# _append[class-native] /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:53
# " --disable-login --disable-su"
# finalize ast.py:331 [finalize]
# "was: --libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
# override[class-native]:append /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux_2.22.2.bb:17
# "--disable-fallocate --disable-use-tty-group"
# finalize override[class-native]:
# " --disable-fallocate --disable-use-tty-group"
# set data_smart.py:414 [finalize]
# " --disable-fallocate --disable-use-tty-group ${@gettext_oeconf(d)}"
# set data_smart.py:414 [finalize]
# " --disable-fallocate --disable-use-tty-group ${@gettext_oeconf(d)} --disable-login --disable-su"
# computed:
# " --disable-fallocate --disable-use-tty-group ${@gettext_oeconf(d)} --disable-login --disable-su"
EXTRA_OECONF="--disable-fallocate --disable-use-tty-group --disable-nls --disable-login --disable-su"

See EXTRA_OECONF is overridden but not appended with "--disable-fallocate --disable-use-tty-group" at util-linux_2.22.2.bb:17, which is not what it's expected.

After apply the patch, the output as following:
#
# $EXTRA_OECONF [10 operations]
# set conf/bitbake.conf:475
# ""
# _append /buildarea2/mliu3/poky/meta/classes/gettext.bbclass:21
# " ${@gettext_oeconf(d)}"
# set /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:47
# "--libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
# append /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:50
# "${@base_contains('DISTRO_FEATURES', 'systemd', '--enable-socket-activation', '--disable-socket-activation', d)}"
# append /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:51
# "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
# _append[class-native] /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux.inc:53
# " --disable-login --disable-su"
# _append[class-native] /buildarea2/mliu3/poky/meta/recipes-core/util-linux/util-linux_2.22.2.bb:17
# " --disable-fallocate --disable-use-tty-group"
# set data_smart.py:414 [finalize]
# "--libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
# set data_smart.py:414 [finalize]
# "--libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
# set data_smart.py:414 [finalize]
# "--libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
# computed:
# "--libdir=${base_libdir} --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx
EXTRA_OECONF="--libdir=/buildarea2/mliu3/poky/build/tmp/sysroots/x86_64-linux/lib --disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset --disable-login --disable-vipw --disable-newgrp --disable-chfn-chsh --disable-su --enable-write --enable-arch --enable-mount --with-fsprobe=builtin --enable-libuuid --enable-libblkid --enable-fsck --without-udev usrsbin_execdir='/buildarea2/mliu3/poky/build/tmp/sysroots/x86_64-linux/usr/sbin' --disable-socket-activation --without-systemdsystemunitdir --disable-nls --disable-login --disable-su --disable-fallocate --disable-use-tty-group"

There is often confusion about which order overrides and the various append operators take effect.

But in this patch, the modified need to be changed to:
+EXTRA_OECONF_append_class-native = "--disable-fallocate --disable-use-tty-group" +EXTRA_OECONF_append_class-nativesdk = "--disable-fallocate --disable-use-tty-group"

replaced "virtclass" with "class" in it, I will send the V1.

the best,
thank you.

Quoted 29 lines

Thanks
Sau!

Quoted 23 lines
---
  meta/recipes-core/util-linux/util-linux_2.23.1.bb |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/util-linux/util-linux_2.23.1.bb +0 -0
index 12f5021..e597c41 100644
@@ -18,5 +18,5 @@ SRC_URI[md5sum] = "6741eeaff93ff5a6bacdd3816bdd87c4"
  SRC_URI[sha256sum] = 

"ad4a7831d7b27d0172996fd343e809716c2403b32a94e15194d8ea797223c4af"

CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"

meta/recipes-core/util-linux/util-linux_2.23.1.bb +2 -6
-EXTRA_OECONF_class-native += "--disable-fallocate 
--disable-use-tty-group"
-EXTRA_OECONF_class-nativesdk += "--disable-fallocate 
--disable-use-tty-group"
+EXTRA_OECONF_append_virtclass-native = "--disable-fallocate 
--disable-use-tty-group"
+EXTRA_OECONF_append_virtclass-nativesdk = "--disable-fallocate 
--disable-use-tty-group"