Skip to contentSkip to conversation

Stop using base_conditional utility method

PATCH In review Otavio Salvador 5 participants 5 messages Jan 31, 2018 – Feb 1, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Stop using base_conditional utility method

OE-Core finally removed the base_conditional method and the recipes must move to bb.utils.contains instead. This patch does the change on all recipes from meta-openembedded so they are compatible with current OE-Core.

---

 meta-initramfs/recipes-devtools/klibc/klibc-utils.inc        | 2 +-
 meta-networking/recipes-connectivity/samba/samba_4.7.0.bb    | 2 +-
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 2 +-
 meta-oe/recipes-devtools/php/php.inc                         | 2 +-
 meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb    | 4 ++--
 meta-oe/recipes-kernel/linux/linux.inc                       | 2 +-
 meta-oe/recipes-support/mongodb/mongodb_git.bb               | 2 +-
 meta-oe/recipes-support/opencv/opencv_3.3.bb                 | 4 ++--
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc              | 4 ++--
 meta-webserver/recipes-httpd/nginx/nginx.inc                 | 2 +-
 10 files changed, 13 insertions(+), 13 deletions(-)
meta-initramfs/recipes-devtools/klibc/klibc-utils.inc +1 -1
index 9014f5267..85639e31c 100644
@@ -48,7 +48,7 @@ do_install() {
     ln -s gzip ${D}${base_bindir}/zcat
 }
 
-EXTRA_KLIBC_DEPS = "${@base_conditional('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}"
+EXTRA_KLIBC_DEPS = "${@bb.utils.contains('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}"
 
 PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*"
 
meta-networking/recipes-connectivity/samba/samba_4.7.0.bb +1 -1
index f33c1384b..7f8cfcc47 100644
@@ -119,7 +119,7 @@ EXTRA_OECONF += "--enable-fhs \
                  --disable-rpath-install \
                  --with-shared-modules=${SAMBA4_MODULES} \
                  --bundled-libraries=${SAMBA4_LIBS} \
-                 ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+                 ${@bb.utils.contains('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
                  --with-cluster-support \
                  --with-profiling-data \
                  --with-libiconv=${STAGING_DIR_HOST}${prefix} \
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +1 -1
index 3c0587469..9b8452c9b 100644
@@ -60,7 +60,7 @@ EXTRA_OECONF = "--enable-shared \
                 --with-defaults \
                 --with-install-prefix=${D} \
                 --with-persistent-directory=${localstatedir}/lib/net-snmp \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
+                ${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
 "
 
 # net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
meta-oe/recipes-devtools/php/php.inc +1 -1
index e466cdaf6..e3b73daa4 100644
@@ -60,7 +60,7 @@ EXTRA_OECONF = "--enable-mbstring \
                 --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \
                 --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \
                 --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
+                ${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
                 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \
                 ${COMMON_EXTRA_OECONF} \
 "
meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb +2 -2
index cbf04734e..391d63c82 100644
@@ -20,8 +20,8 @@ S = "${WORKDIR}/git"
 inherit cmake
 
 EXTRA_OECMAKE = "-DWITH_PYTHON=ON \
-                 ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
-                 ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
+                 ${@bb.utils.contains("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
+                 ${@bb.utils.contains("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
                 "
 
 LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
meta-oe/recipes-kernel/linux/linux.inc +1 -1
index e20012771..e39cfbbf5 100644
@@ -16,7 +16,7 @@ CMDLINE_DEBUG ?= "loglevel=3"
 
 # Kernel bootlogo is distro-specific (default is OE logo).
 # Logo resolution (qvga, vga, ...) is machine-specific.
-LOGO_SIZE ?= '${@base_conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
+LOGO_SIZE ?= '${@bb.utils.contains("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
 # To use this, add file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2 or similar
 # to your kernel recipe, and then structure your logos for each resolution
 # accordingly.
meta-oe/recipes-support/mongodb/mongodb_git.bb +1 -1
index 0ff7d0b59..a9dd23435 100644
@@ -58,7 +58,7 @@ EXTRA_OESCONS = "--prefix=${D}${prefix} \
                  --use-system-zlib \
                  --js-engine=none \
                  --nostrip \
-                 --endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
+                 --endian=${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
                  ${PACKAGECONFIG_CONFARGS} \
                  mongod mongos"
 
meta-oe/recipes-support/opencv/opencv_3.3.bb +2 -2
index 3663d30e9..08dd0bae0 100644
@@ -82,8 +82,8 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
-    ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
-    ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
+    ${@bb.utils.contains("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
+    ${@bb.utils.contains("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
 "
 EXTRA_OECMAKE_append_x86 = " -DX86=ON"
 
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +2 -2
index f1bf9b06f..3f4e2f25d 100644
@@ -41,7 +41,7 @@ EXTRA_OECONF = " \
 "
 
 CONFIG_TLS = "--enable-thread-tls"
-CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}"
+CONFIG_TLS_arm = "${@bb.utils.contains( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}"
 
 PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \
@@ -101,7 +101,7 @@ CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf"
 
 # syslog initscript is handled explicitly because order of
 # update-rc.d and update-alternatives is important
-RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
 
 RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog"
 
meta-webserver/recipes-httpd/nginx/nginx.inc +1 -1
index 51523b606..7a48d607a 100644
@@ -51,7 +51,7 @@ do_configure () {
 
     ./configure \
     --crossbuild=Linux:${TUNE_ARCH} \
-    --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
+    --with-endian=${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
     --with-int=4 \
     --with-long=${PTRSIZE} \
     --with-long-long=8 \
Signature · 1 line
2.16.1
#1 lore raw

FWIW: I've sent the same change yesterday.

Quoted 221 lines · Otavio Salvador

OE-Core finally removed the base_conditional method and the recipes must move to bb.utils.contains instead. This patch does the change on all recipes from meta-openembedded so they are compatible with current OE-Core.

---

 meta-initramfs/recipes-devtools/klibc/klibc-utils.inc        | 2 +-
 meta-networking/recipes-connectivity/samba/samba_4.7.0.bb    | 2 +-
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 2 +-
 meta-oe/recipes-devtools/php/php.inc                         | 2 +-
 meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb    | 4 ++--
 meta-oe/recipes-kernel/linux/linux.inc                       | 2 +-
 meta-oe/recipes-support/mongodb/mongodb_git.bb               | 2 +-
 meta-oe/recipes-support/opencv/opencv_3.3.bb                 | 4 ++--
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc              | 4 ++--
 meta-webserver/recipes-httpd/nginx/nginx.inc                 | 2 +-
 10 files changed, 13 insertions(+), 13 deletions(-)
meta-initramfs/recipes-devtools/klibc/klibc-utils.inc +0 -1
index 9014f5267..85639e31c 100644
@@ -48,7 +48,7 @@ do_install() {
     ln -s gzip ${D}${base_bindir}/zcat
 }
 
-EXTRA_KLIBC_DEPS = "${@base_conditional('KLIBC_UTILS_VARIANT', 'shared',

'${THIS_LIBKLIBC}', '', d)}"
+EXTRA_KLIBC_DEPS = "${@bb.utils.contains('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}"

PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*"

meta-networking/recipes-connectivity/samba/samba_4.7.0.bb +1 -1
index f33c1384b..7f8cfcc47 100644
@@ -119,7 +119,7 @@ EXTRA_OECONF += "--enable-fhs \
                  --disable-rpath-install \
                  --with-shared-modules=${SAMBA4_MODULES} \
                  --bundled-libraries=${SAMBA4_LIBS} \
-                 ${@base_conditional('TARGET_ARCH', 'x86_64', '',
 '--disable-glusterfs', d)} \
+                 ${@bb.utils.contains('TARGET_ARCH', 'x86_64', '',
 '--disable-glusterfs', d)} \
                  --with-cluster-support \
                  --with-profiling-data \
                  --with-libiconv=${STAGING_DIR_HOST}${prefix} \
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +1 -1
index 3c0587469..9b8452c9b 100644
@@ -60,7 +60,7 @@ EXTRA_OECONF = "--enable-shared \
                 --with-defaults \
                 --with-install-prefix=${D} \
                 --with-persistent-directory=${localstatedir}/lib/net-snmp
 \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le',
 '--with-endianness=little', '--with-endianness=big', d)} \
+                ${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le',
 '--with-endianness=little', '--with-endianness=big', d)} \

"

 # net-snmp needs to have mib-modules=smux enabled to enable quagga to
support snmp
meta-oe/recipes-devtools/php/php.inc +1 -1
index e466cdaf6..e3b73daa4 100644
@@ -60,7 +60,7 @@ EXTRA_OECONF = "--enable-mbstring \
                 --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \
                 --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \
                 --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}
 \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le',
 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
+                ${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le',
 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \
                 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '',
'ac_cv_lib_pam_pam_start=no', d)} \
                 ${COMMON_EXTRA_OECONF} \

"

meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb +2 -2
index cbf04734e..391d63c82 100644
@@ -20,8 +20,8 @@ S = "${WORKDIR}/git"
 inherit cmake
 
 EXTRA_OECMAKE = "-DWITH_PYTHON=ON \
-                 ${@base_conditional("libdir", "/usr/lib64",
 "-DLIB_SUFFIX=64", "", d)} \
-                 ${@base_conditional("libdir", "/usr/lib32",
 "-DLIB_SUFFIX=32", "", d)} \
+                 ${@bb.utils.contains("libdir", "/usr/lib64",
 "-DLIB_SUFFIX=64", "", d)} \
+                 ${@bb.utils.contains("libdir", "/usr/lib32",
"-DLIB_SUFFIX=32", "", d)} \
                 "

LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold',
' -fuse-ld=bfd ', '', d)}"

meta-oe/recipes-kernel/linux/linux.inc +0 -1
index e20012771..e39cfbbf5 100644
@@ -16,7 +16,7 @@ CMDLINE_DEBUG ?= "loglevel=3"
 
 # Kernel bootlogo is distro-specific (default is OE logo).
 # Logo resolution (qvga, vga, ...) is machine-specific.
-LOGO_SIZE ?= '${@base_conditional("MACHINE_GUI_CLASS", "bigscreen",

"vga", "qvga", d)}'
+LOGO_SIZE ?= '${@bb.utils.contains("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
# To use this, add file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2 or
similar

 # to your kernel recipe, and then structure your logos for each resolution
 # accordingly.
meta-oe/recipes-support/mongodb/mongodb_git.bb +1 -1
index 0ff7d0b59..a9dd23435 100644
@@ -58,7 +58,7 @@ EXTRA_OESCONS = "--prefix=${D}${prefix} \
                  --use-system-zlib \
                  --js-engine=none \
                  --nostrip \
-                 --endian=${@base_conditional('SITEINFO_ENDIANNESS',
 'le', 'little', 'big', d)} \
+                 --endian=${@bb.utils.contains('SITEINFO_ENDIANNESS',
 'le', 'little', 'big', d)} \
                  ${PACKAGECONFIG_CONFARGS} \

mongod mongos"

meta-oe/recipes-support/opencv/opencv_3.3.bb +0 -5
index 3663d30e9..08dd0bae0 100644
@@ -82,8 +82,8 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules
 \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1
-DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1
-DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)}
 \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1
-DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1
-DENABLE_SSE42=1", "", d)} \
-    ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "",

d)} \
- ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "",
d)} \
+ ${@bb.utils.contains("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "",
d)} \
+ ${@bb.utils.contains("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "",
d)} \
"
EXTRA_OECMAKE_append_x86 = " -DX86=ON"

meta-oe/recipes-support/syslog-ng/syslog-ng.inc +1 -3
index f1bf9b06f..3f4e2f25d 100644
@@ -41,7 +41,7 @@ EXTRA_OECONF = " \
 "
 
 CONFIG_TLS = "--enable-thread-tls"
-CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", "
--disable-thread-tls", " --enable-thread-tls", d )}"
+CONFIG_TLS_arm = "${@bb.utils.contains( "DEBUG_BUILD", "1", "
--disable-thread-tls", " --enable-thread-tls", d )}"
 
 PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \
@@ -101,7 +101,7 @@ CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf

${sysconfdir}/scl.conf"

 # syslog initscript is handled explicitly because order of
 # update-rc.d and update-alternatives is important
-RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT",
"none", "", "update-rc.d", d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains("ONLINE_PACKAGE_MANAGEMENT",
"none", "", "update-rc.d", d)}"

RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog"

meta-webserver/recipes-httpd/nginx/nginx.inc +1 -1
index 51523b606..7a48d607a 100644
@@ -51,7 +51,7 @@ do_configure () {
 
     ./configure \
     --crossbuild=Linux:${TUNE_ARCH} \
-    --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le',
 'little', 'big', d)} \
+    --with-endian=${@bb.utils.contains('SITEINFO_ENDIANNESS', 'le',
 'little', 'big', d)} \
     --with-int=4 \
     --with-long=${PTRSIZE} \
     --with-long-long=8 \

--
2.16.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 1 line · Martin Jansa

FWIW: I've sent the same change yesterday.

Great; it was not merged yet it seems as I got parse errors :-( Armin?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw

Would it possible to fast-track this to master? It is breaking all my builds.

Quoted 5 lines · Otavio Salvador
Quoted 1 line · Martin Jansa

FWIW: I've sent the same change yesterday.

Great; it was not merged yet it seems as I got parse errors :-( Armin?

#4 lore raw
Quoted 1 line · Martin Kelly

Would it possible to fast-track this to master? It is breaking all my builds.

you can always cherry pick from patchwork.

Quoted 7 lines · Otavio Salvador
Quoted 5 lines · Martin Jansa
Quoted 1 line

FWIW: I've sent the same change yesterday.

Great; it was not merged yet it seems as I got parse errors :-(  Armin?