Skip to contentSkip to conversation

disable allarch when multilib is used

PATCH In review [email protected] 5 participants 20 messages Sep 6, 2018 – Jan 17, 2019

lore
Share & tools
lore
#0 lore raw

v5 cover disable allarch when multilib is used

From: Kai Kang <[email protected]>

V5:
* set PACKAGE_ARCH in event handler bb.event.RecipePreFinalise
* add execption of target-sdk-provides-dummy for package_qa_multilib check

The following changes since commit c710430aa1a5a30d3087c3102485d4621e8d179e:

Revert "prelink: Fix SRC_URI and branch" (2018-09-06 14:49:28 +0100)

are available in the Git repository at:

git://git.pokylinux.org/poky-contrib kangkai/noarchV5
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/noarchV5

Kai Kang (7):
allarch: only enable allarch when multilib is not used sstate.bbclass: update SSTATE_DUPWHITELIST
update_font_cache: update script for multilib update_gtk_immodules_cache: update for multilib statetests.py: drop test_sstate_allarch_samesigs_multilib
multilib: fix install file conflicts
target-sdk-provides-dummy: skip package_qa_multilib check

 meta/classes/allarch.bbclass                         | 12 +++++++++++-
 meta/classes/icecc.bbclass                           |  2 +-
 meta/classes/multilib.bbclass                        |  7 ++++++-
 meta/classes/multilib_global.bbclass                 |  4 +---
 meta/classes/package.bbclass                         |  9 ++++++---
 meta/classes/populate_sdk_base.bbclass               |  3 +--
 meta/classes/sstate.bbclass                          |  4 +++-
 meta/lib/oeqa/selftest/cases/sstatetests.py          | 11 ++---------
 meta/recipes-core/udev/eudev_3.2.5.bb                |  6 ++++--
 .../gobject-introspection_1.56.1.bb                  |  6 ++++--
 meta/recipes-gnome/gtk+/gtk+.inc                     |  4 ++++
 meta/recipes-gnome/gtk+/gtk+3.inc                    |  4 ++++
 meta/recipes-graphics/cairo/cairo_1.14.12.bb         |  6 ++++--
 .../recipes-graphics/fontconfig/fontconfig_2.12.6.bb |  8 +++++++-
 meta/recipes-support/icu/icu.inc                     |  4 +++-
 .../libgpg-error/libgpg-error_1.32.bb                |  5 ++++-
 scripts/postinst-intercepts/update_font_cache        |  2 +-
 .../postinst-intercepts/update_gtk_immodules_cache   |  8 ++++----
 18 files changed, 70 insertions(+), 35 deletions(-)
Signature · 1 line
2.18.0
#1 lore raw

PATCH v5 1/7 allarch: only enable allarch when multilib is not used

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
 meta/classes/allarch.bbclass         | 12 +++++++++++-
 meta/classes/icecc.bbclass           |  2 +-
 meta/classes/multilib.bbclass        |  3 ++-
 meta/classes/multilib_global.bbclass |  4 +---
 meta/classes/package.bbclass         |  9 ++++++---
 5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +11 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
 # This class is used for architecture independent recipes/data files (usually scripts)
 #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"
 
 python () {
     # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
     return "yes"
 
 def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
 def icecc_is_kernel(bb, d):
     return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
         raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
     # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
         return
 
     if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
     if key in data:
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
             return pkg
         return data[key]
 
@@ -1413,7 +1414,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
     workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
 }
Signature · 1 line
2.18.0
#10 lore raw

PATCH v5 2/7 sstate.bbclass: update SSTATE_DUPWHITELIST

In reply to [email protected]

From: Kai Kang <[email protected]>

Update SSTATE_DUPWHITELIST in sstate.bbclass.

* remove ${DEPLOY_DIR_RPM}/noarch/ which is not overwritten any more
* add directories for package target-sdk-provides-dummy

---
 meta/classes/sstate.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +3 -1
index ecf08fb2d0..efb0096c70 100644
@@ -25,12 +25,14 @@ PV[vardepvalue] = "${PV}"
 SSTATE_EXTRAPATH[vardepvalue] = ""
 
 # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
+SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/"
 # Avoid docbook/sgml catalog warnings for now
 SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
 # sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-nativesdk/"
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/"
+# target-sdk-provides-dummy overlaps that allarch is disabled when multilib is used
+SSTATE_DUPWHITELIST += "${COMPONENTS_DIR}/sdk-provides-dummy-target/ ${DEPLOY_DIR_RPM}/sdk_provides_dummy_target/ ${DEPLOY_DIR_IPK}/sdk-provides-dummy-target/"
 # Archive the sources for many architectures in one deploy folder
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
 # ovmf/grub-efi/systemd-boot/intel-microcode multilib recipes can generate identical overlapping files
Signature · 1 line
2.18.0
#11 lore raw

PATCH v5 3/7 update_font_cache: update script for multilib

In reply to [email protected]

From: Kai Kang <[email protected]>

Packages which inherit fontcache.bbclass call postinstall script update_font_cache. And in update_font_cache, it calls ${bindir}/fc-cache by qemuwrapper. When multilib is enabled, both packages foo and lib32-foo will call ${bindir}/fc-cache and one of them will fail to run obviously.

Duplicate install file fc-cache to ${libexecdir} with ${MLPREFIX} and call proper fc-cache in update_font_cache.

---
 meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb | 8 +++++++-
 scripts/postinst-intercepts/update_font_cache         | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta/recipes-graphics/fontconfig/fontconfig_2.12.6.bb +7 -1
index d4cbce80b4..cec524755d 100644
@@ -35,9 +35,15 @@ do_configure_prepend() {
     rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
 }
 
+do_install_append_class-target() {
+    # duplicate fc-cache for postinstall script
+    mkdir -p ${D}${libexecdir}
+    ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
+}
+
 PACKAGES =+ "fontconfig-utils"
 FILES_${PN} =+ "${datadir}/xml/*"
-FILES_fontconfig-utils = "${bindir}/*"
+FILES_fontconfig-utils = "${bindir}/* ${libexecdir}/*"
 
 # Work around past breakage in debian.bbclass
 RPROVIDES_fontconfig-utils = "libfontconfig-utils"
scripts/postinst-intercepts/update_font_cache +1 -1
index 20e9048adf..e0ec471964 100644
@@ -2,5 +2,5 @@
 
 set -e
 
-PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D -E ${fontconfigcacheenv} $D${bindir}/fc-cache --sysroot=$D --system-only ${fontconfigcacheparams}
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D -E ${fontconfigcacheenv} $D${libexecdir}/${binprefix}fc-cache --sysroot=$D --system-only ${fontconfigcacheparams}
 chown -R root:root $D${fontconfigcachedir}
Signature · 1 line
2.18.0
#12 lore raw

PATCH v5 4/7 update_gtk_immodules_cache: update for multilib

In reply to [email protected]

From: Kai Kang <[email protected]>

Postinstall script update_gtk_immodules_cache calls ${bindir}/gtk-query-immodules-${version}. When multilib is enabled, both packages foo and lib32-foo call ${bindir}/gtk-query-immodules-${version} and one of them will fail to run obviously.

Duplicate install files gtk-query-immodules-${version} to ${libexecdir} with ${MLPREFIX}. And update update_gtk_immodules_cache calls proper binary.

---
 meta/recipes-gnome/gtk+/gtk+.inc                       | 4 ++++
 meta/recipes-gnome/gtk+/gtk+3.inc                      | 4 ++++
 scripts/postinst-intercepts/update_gtk_immodules_cache | 8 ++++----
 3 files changed, 12 insertions(+), 4 deletions(-)
meta/recipes-gnome/gtk+/gtk+.inc +4 -0
index 558bc485ad..14ed8d812c 100644
@@ -90,6 +90,10 @@ do_install () {
 	install -m 0644 ${S}/gtk/gtkfilesystemmodel.h    ${D}${includedir}/gtk-2.0/gtk/
 
 	mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
+
+    # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache
+    mkdir -p ${D}${libexecdir}
+    ln ${D}${bindir}/gtk-query-immodules-2.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-2.0
 }
 
 SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
meta/recipes-gnome/gtk+/gtk+3.inc +4 -0
index 420ead2ca2..6331a4323c 100644
@@ -53,6 +53,10 @@ PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,way
 
 do_install_append() {
 	mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
+
+    # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache
+    mkdir -p ${D}${libexecdir}
+    ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0
 }
 
 PACKAGES =+ "${PN}-demo"
scripts/postinst-intercepts/update_gtk_immodules_cache +4 -4
index d85d3622c2..395516971e 100644
@@ -2,14 +2,14 @@
 
 set -e
 
-if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
-    PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D/${bindir}/gtk-query-immodules-2.0 \
+if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 ]; then
+    PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 \
         > $D${libdir}/gtk-2.0/2.10.0/immodules.cache &&
         sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
         chown root:root $D${libdir}/gtk-2.0/2.10.0/immodules.cache
 fi
-if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
-    PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D/${bindir}/gtk-query-immodules-3.0 \
+if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 ]; then
+    PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 \
         > $D${libdir}/gtk-3.0/3.0.0/immodules.cache &&
         sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
         chown root:root $D${libdir}/gtk-3.0/3.0.0/immodules.cache
Signature · 1 line
2.18.0
#13 lore raw

PATCH v5 5/7 statetests.py: drop test_sstate_allarch_samesigs_multilib

In reply to [email protected]

From: Kai Kang <[email protected]>

allarch is disabled when multilib is used, so sstate oeqa case test_sstate_allarch_samesigs_multilib is useless. Remove check for allarch part and rename to test_sstate_nativesdk_samesigs_multilib.

---
 meta/lib/oeqa/selftest/cases/sstatetests.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
meta/lib/oeqa/selftest/cases/sstatetests.py +2 -9
index 7b008e409f..7194225c0a 100644
@@ -349,12 +349,9 @@ MACHINE = \"qemuarm\"
         self.sstate_allarch_samesigs(configA, configB)
 
     @OETestID(1645)
-    def test_sstate_allarch_samesigs_multilib(self):
+    def test_sstate_nativesdk_samesigs_multilib(self):
         """
-        The sstate checksums of allarch multilib packages should be independent of whichever
-        MACHINE is set. Check this using bitbake -S.
-        Also, rather than duplicate the test, check nativesdk stamps are the same between
-        the two MACHINE values.
+        check nativesdk stamps are the same between the two MACHINE values.
         """
 
         configA = """
@@ -392,10 +389,6 @@ MULTILIBS = \"\"
                         (_, task, _, shash) = name.rsplit(".", 3)
                         f[os.path.join(os.path.basename(root), task)] = shash
             return f
-        files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/all" + self.target_vendor + "-" + self.target_os)
-        files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/all" + self.target_vendor + "-" + self.target_os)
-        self.maxDiff = None
-        self.assertEqual(files1, files2)
 
         nativesdkdir = os.path.basename(glob.glob(self.topdir + "/tmp-sstatesamehash/stamps/*-nativesdk*-linux")[0])
 
Signature · 1 line
2.18.0
#14 lore raw

PATCH v5 6/7 multilib: fix install file conflicts

In reply to [email protected]

From: Kai Kang <[email protected]>

Fix install files conflicts between multlib packages:

| Error: Transaction check error:
|   file /usr/bin/g-ir-annotation-tool conflicts between attempted installs of lib32-gobject-introspection-1.56.1-r0.x86 and gobject-introspection-1.56.1-r0.core2_64
|   file /usr/bin/g-ir-scanner conflicts between attempted installs of lib32-gobject-introspection-1.56.1-r0.x86 and gobject-introspection-1.56.1-r0.core2_64
|   file /usr/bin/cairo-trace conflicts between attempted installs of lib32-libcairo-perf-utils-1.14.12-r0.x86 and libcairo-perf-utils-1.14.12-r0.core2_64
|   file /usr/bin/icu-config conflicts between attempted installs of lib32-icu-dev-62.1-r0.x86 and icu-dev-62.1-r0.core2_64
|   file /usr/share/gir-1.0/GLib-2.0.gir conflicts between attempted installs of gobject-introspection-dev-1.56.1-r0.core2_64 and lib32-gobject-introspection-dev-1.56.1-r0.x86
|   file /usr/bin/gpgrt-config conflicts between attempted installs of lib32-libgpg-error-dev-1.32-r0.x86 and libgpg-error-dev-1.32-r0.core2_64
|   file /usr/share/pkgconfig/udev.pc conflicts between attempted installs of eudev-dev-3.2.5-r0.core2_64 and lib32-eudev-dev-3.2.5-r0.x86
---
 meta/recipes-core/udev/eudev_3.2.5.bb                       | 6 ++++--
 .../gobject-introspection/gobject-introspection_1.56.1.bb   | 6 ++++--
 meta/recipes-graphics/cairo/cairo_1.14.12.bb                | 6 ++++--
 meta/recipes-support/icu/icu.inc                            | 4 +++-
 meta/recipes-support/libgpg-error/libgpg-error_1.32.bb      | 5 ++++-
 5 files changed, 19 insertions(+), 8 deletions(-)
meta/recipes-core/udev/eudev_3.2.5.bb +4 -2
index 75617c8d4e..75130f03ef 100644
@@ -23,7 +23,9 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
 SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
 SRC_URI[sha256sum] = "49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"
 
-inherit autotools update-rc.d qemu pkgconfig distro_features_check
+inherit autotools update-rc.d qemu pkgconfig distro_features_check multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/udev.pc"
 
 CONFLICT_DISTRO_FEATURES = "systemd"
 
@@ -65,7 +67,7 @@ PACKAGES =+ "eudev-hwdb"
 
 
 FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc* \
                    ${includedir}/libudev.h ${libdir}/libudev.so \
                    ${includedir}/udev.h ${libdir}/libudev.la \
                    ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.56.1.bb +4 -2
index f3479565ea..887ff58049 100644
@@ -23,7 +23,9 @@ SRC_URI[sha256sum] = "5b2875ccff99ff7baab63a34b67f8c920def240e178ff50add809e267d
 
 SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch"
 
-inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
+inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner ${PN}-dev:${datadir}/gir-1.0/GLib-2.0.gir"
 
 DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
 
@@ -177,7 +179,7 @@ FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
 
 # .gir files go to dev package, as they're needed for developing (but not for running)
 # things that depends on introspection.
-FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir*"
 FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc"
 
 # These are used by gobject-based packages
meta/recipes-graphics/cairo/cairo_1.14.12.bb +4 -2
index a902c26879..18b947948a 100644
@@ -30,7 +30,9 @@ SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
 SRC_URI[md5sum] = "9f0db9dbfca0966be8acd682e636d165"
 SRC_URI[sha256sum] = "8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16"
 
-inherit autotools pkgconfig upstream-version-is-even gtk-doc
+inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
 
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 
@@ -79,7 +81,7 @@ DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
 FILES_${PN} = "${libdir}/libcairo.so.*"
 FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
 FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
-FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
+FILES_${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
 FILES_${PN}-dev += "${libdir}/cairo/*.so"
 
 BBCLASSEXTEND = "native"
meta/recipes-support/icu/icu.inc +3 -1
index f0786baa03..e20085fbf5 100644
@@ -19,7 +19,9 @@ BINCONFIG = "${bindir}/icu-config"
 
 ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
 
-inherit autotools pkgconfig binconfig
+inherit autotools pkgconfig binconfig multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/icu-config"
 
 # ICU needs the native build directory as an argument to its --with-cross-build option when
 # cross-compiling. Taken the situation that different builds may share a common sstate-cache
meta/recipes-support/libgpg-error/libgpg-error_1.32.bb +4 -1
index 098242ea10..a4c720be9d 100644
@@ -20,7 +20,10 @@ SRC_URI[sha256sum] = "c345c5e73cc2332f8d50db84a2280abfb1d8f6d4f1858b9daa30404db4
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
+
 CPPFLAGS += "-P"
 do_compile_prepend() {
 	TARGET_FILE=linux-gnu
Signature · 1 line
2.18.0
#17 lore raw

PATCH v5 7/7 target-sdk-provides-dummy: skip package_qa_multilib check

In reply to [email protected]

From: Kai Kang <[email protected]>

The rprovides of target-sdk-provides-dummy don't be updated with multilib, so it fails package_qa_multilib check. Because target-sdk-provides-dummy doesn't install any file to sysroot, it is safe to skip package_qa_multilib check for target-sdk-provides-dummy.

Remove ${MLPREFIX}target-sdk-provides-dummy from TOOLCHAIN_TARGET_TASK at same time in populate_sdk_base.bbclass.

---
 meta/classes/multilib.bbclass          | 4 ++++
 meta/classes/populate_sdk_base.bbclass | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/multilib.bbclass +4 -0
index 7b4d6472b0..e7b717eee1 100644
@@ -146,6 +146,10 @@ python do_package_qa_multilib() {
     if not ml:
         return
 
+    # exception for ${MLPREFIX}target-sdk-provides-dummy
+    if 'target-sdk-provides-dummy' in d.getVar('PN'):
+        return
+
     packages = d.getVar('PACKAGES')
     for pkg in packages.split():
         check_mlprefix(pkg, 'RDEPENDS', ml)
meta/classes/populate_sdk_base.bbclass +1 -2
index bbf1ff1cd2..e07ad0cc6b 100644
@@ -40,8 +40,7 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
 
 TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE}"
 TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
-TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} \
-                          ${@multilib_pkg_extend(d, 'target-sdk-provides-dummy')}"
+TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} target-sdk-provides-dummy"
 TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
 
Signature · 1 line
2.18.0
#18 lore raw

✗ patchtest: failure for disable allarch when multilib is used

In reply to [email protected]

== Series Details ==

Series: disable allarch when multilib is used
Revision: 1
URL : https://patchwork.openembedded.org/series/13937/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Patch            [1/7] allarch: only enable allarch when multilib is not used
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#15 lore raw

Re: [PATCH 6/7] multilib: fix install file conflicts

In reply to [email protected]
Quoted 28 lines · On Thu, 2018-09-06 at 23:52 +0800, [email protected] wrote:
meta/recipes- renamed from meta/recipes-core/udev/eudev_3.2.5.bb +0 -0

core/udev/eudev_3.2.5.bb
index 75617c8d4e..75130f03ef 100644

meta/recipes-core/udev/eudev_3.2.5.bb +0 -0
@@ -23,7 +23,9 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/$
 {BP}.tar.gz \
 SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
 SRC_URI[sha256sum] =

"49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"

meta/recipes-core/udev/eudev_3.2.5.bb +1 -1
-inherit autotools update-rc.d qemu pkgconfig distro_features_check
+inherit autotools update-rc.d qemu pkgconfig distro_features_check

multilib_script

meta/recipes-core/udev/eudev_3.2.5.bb +3 -1
+
+MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/udev.pc"
 
 CONFLICT_DISTRO_FEATURES = "systemd"
@@ -65,7 +67,7 @@ PACKAGES =+ "eudev-hwdb"
 
 
 FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc* \
                    ${includedir}/libudev.h ${libdir}/libudev.so \
                    ${includedir}/udev.h ${libdir}/libudev.la \
                    ${libdir}/libudev.a
Quoted 1 line

${libdir}/pkgconfig/libudev.pc"

I already commented on this, the file should be installed into libdir if its arch specific. I suspect libudev.pc is, udev.pc is not and udev.pc needs to stop referencing libdir.

Regardless, we're not using MULTILIB_SCRIPTS for .pc files.

Cheers,

Richard

author
#16 lore raw

Re: [PATCH 6/7] multilib: fix install file conflicts

Quoted 23 lines · On 2018年09月07日 06:31, [email protected] wrote:
Quoted 22 lines · On Thu, 2018-09-06 at 23:52 +0800, [email protected] wrote:
meta/recipes- renamed from meta/recipes-core/udev/eudev_3.2.5.bb +0 -0

core/udev/eudev_3.2.5.bb
index 75617c8d4e..75130f03ef 100644

meta/recipes-core/udev/eudev_3.2.5.bb +0 -0
@@ -23,7 +23,9 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/$
 {BP}.tar.gz \
  SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
  SRC_URI[sha256sum] =

"49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"

meta/recipes-core/udev/eudev_3.2.5.bb +1 -1
-inherit autotools update-rc.d qemu pkgconfig distro_features_check
+inherit autotools update-rc.d qemu pkgconfig distro_features_check

multilib_script

meta/recipes-core/udev/eudev_3.2.5.bb +2 -0
+
+MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/udev.pc"
 
  CONFLICT_DISTRO_FEATURES = "systemd"
@@ -65,7 +67,7 @@ PACKAGES =+ "eudev-hwdb"
 
 
Quoted 10 lines
Quoted 7 lines
meta/recipes-core/udev/eudev_3.2.5.bb +1 -1
  FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc* \
                     ${includedir}/libudev.h ${libdir}/libudev.so \
                     ${includedir}/udev.h ${libdir}/libudev.la \
                     ${libdir}/libudev.a

${libdir}/pkgconfig/libudev.pc"

I already commented on this, the file should be installed into libdir if its arch specific. I suspect libudev.pc is, udev.pc is not and udev.pc needs to stop referencing libdir.

Sorry, I thought no good way to deal ${libdir} in .pc files. I'll fix it.

Regards,
Kai

Quoted 8 lines

Regardless, we're not using MULTILIB_SCRIPTS for .pc files.

Cheers,

Richard

Signature · 2 lines
Regards,
Neil | Kai Kang
#19 lore raw
In reply to [email protected]
Quoted 6 lines · On Thu, 2018-09-06 at 23:52 +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

V5:
* set PACKAGE_ARCH in event handler bb.event.RecipePreFinalise
* add execption of target-sdk-provides-dummy for package_qa_multilib check

In general this looks good but oe-selftest -r sstatetests.SStateTests.test_sstate_nativesdk_samesigs_multilib fails:

https://typhoon.yocto.io/#/builders/28/builds/44/steps/7/logs/step2d

Cheers,

Richard

#2 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

In reply to [email protected]
Quoted 35 lines · On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
 meta/classes/allarch.bbclass         | 12 +++++++++++-
 meta/classes/icecc.bbclass           |  2 +-
 meta/classes/multilib.bbclass        |  3 ++-
 meta/classes/multilib_global.bbclass |  4 +---
 meta/classes/package.bbclass         |  9 ++++++---
 5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +1 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
 # This class is used for architecture independent recipes/data files (usually scripts)
 #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {

meta/classes/allarch.bbclass line 15

Quoted 10 lines
meta/classes/allarch.bbclass +10 -0
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH through another bbclass, but then overwritten with "all" by allarch_package_arch_handler:

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11
# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in oe-core I get:

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set /OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb:9
# "${MACHINE_ARCH}"
# set? /OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12
# "all"

# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Cheers,

Quoted 87 lines
meta/classes/allarch.bbclass +0 -0
 python () {
     # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
     return "yes"
 
 def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
 def icecc_is_kernel(bb, d):
     return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
         raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
     # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
         return
 
     if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
     if key in data:
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
             return pkg
         return data[key]
 
@@ -1413,7 +1414,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
     workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
 }
Signature · 7 lines
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

Quoted 79 lines · Martin Jansa
Quoted 35 lines · On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
 meta/classes/allarch.bbclass         | 12 +++++++++++-
 meta/classes/icecc.bbclass           |  2 +-
 meta/classes/multilib.bbclass        |  3 ++-
 meta/classes/multilib_global.bbclass |  4 +---
 meta/classes/package.bbclass         |  9 ++++++---
 5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +1 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
 # This class is used for architecture independent recipes/data files (usually scripts)
 #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {

meta/classes/allarch.bbclass line 15

Quoted 10 lines
meta/classes/allarch.bbclass +10 -0
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH through another bbclass, but then overwritten with "all" by allarch_package_arch_handler:

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11
# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in oe-core I get:

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set /OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb:9
# "${MACHINE_ARCH}"
# set? /OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12
# "all"

Quoted 5 lines
# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Now I see the difference, I was still living in the days when "disabling" allarch was possible just by setting PACKAGE_ARCH before inheritting allarch, but now I see that packagegroups do conditional inherit as well since:
http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e
http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab
so I'll modify currently failing recipes to do the same and stop inheritting allarch when PACKAGE_ARCH is set to something else.

Cheers,

Quoted 89 lines
Quoted 86 lines
meta/classes/allarch.bbclass +0 -0
 python () {
     # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
     return "yes"
 
 def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
 def icecc_is_kernel(bb, d):
     return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
         raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
     # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
         return
 
     if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
     if key in data:
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
             return pkg
         return data[key]
 
@@ -1413,7 +1414,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
     workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
 }
Signature · 7 lines
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

Quoted 86 lines · Martin Jansa
Quoted 79 lines · Martin Jansa
Quoted 35 lines · On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
 meta/classes/allarch.bbclass         | 12 +++++++++++-
 meta/classes/icecc.bbclass           |  2 +-
 meta/classes/multilib.bbclass        |  3 ++-
 meta/classes/multilib_global.bbclass |  4 +---
 meta/classes/package.bbclass         |  9 ++++++---
 5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +1 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
 # This class is used for architecture independent recipes/data files (usually scripts)
 #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {

meta/classes/allarch.bbclass line 15

Quoted 10 lines
meta/classes/allarch.bbclass +10 -0
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH through another bbclass, but then overwritten with "all" by allarch_package_arch_handler:

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11
# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in oe-core I get:

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set /OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb:9
# "${MACHINE_ARCH}"
# set? /OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12
# "all"

Quoted 5 lines
# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Quoted 8 lines

Now I see the difference, I was still living in the days when "disabling" allarch was possible just by setting PACKAGE_ARCH before inheritting allarch, but now I see that packagegroups do conditional inherit as well since:
http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e
http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab
so I'll modify currently failing recipes to do the same and stop inheritting allarch when PACKAGE_ARCH is set to something else.

From public layers I've found with test-signatures script only fbset-nodes recipe in meta-oe which was setting PACKAGE_ARCH after allarch inherit, allarch removal sent here:
http://lists.openembedded.org/pipermail/openembedded-devel/2018-September/120560.html

Quoted 97 lines

Cheers,

Quoted 89 lines
Quoted 86 lines
meta/classes/allarch.bbclass +0 -0
 python () {
     # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
     return "yes"
 
 def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
 def icecc_is_kernel(bb, d):
     return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
         raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
     # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
         return
 
     if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
     if key in data:
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
             return pkg
         return data[key]
 
@@ -1413,7 +1414,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
     workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
 }
Signature · 7 lines
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

Quoted 96 lines · Martin Jansa
Quoted 86 lines · Martin Jansa
Quoted 79 lines · Martin Jansa
Quoted 35 lines · On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
 meta/classes/allarch.bbclass         | 12 +++++++++++-
 meta/classes/icecc.bbclass           |  2 +-
 meta/classes/multilib.bbclass        |  3 ++-
 meta/classes/multilib_global.bbclass |  4 +---
 meta/classes/package.bbclass         |  9 ++++++---
 5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +1 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
 # This class is used for architecture independent recipes/data files (usually scripts)
 #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {

meta/classes/allarch.bbclass line 15

Quoted 10 lines
meta/classes/allarch.bbclass +10 -0
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH through another bbclass, but then overwritten with "all" by allarch_package_arch_handler:

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11
# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in oe-core I get:

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set /OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb:9
# "${MACHINE_ARCH}"
# set? /OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12
# "all"

Quoted 5 lines
# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Quoted 8 lines

Now I see the difference, I was still living in the days when "disabling" allarch was possible just by setting PACKAGE_ARCH before inheritting allarch, but now I see that packagegroups do conditional inherit as well since:
http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e
http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab
so I'll modify currently failing recipes to do the same and stop inheritting allarch when PACKAGE_ARCH is set to something else.

Quoted 4 lines

From public layers I've found with test-signatures script only fbset-nodes recipe in meta-oe which was setting PACKAGE_ARCH after allarch inherit, allarch removal sent here:
http://lists.openembedded.org/pipermail/openembedded-devel/2018-September/120560.html

target-sdk-provides-dummy seems to be affected as well:
=== Comparing signatures for task do_populate_sysroot.sigdata between qemux86 and qemux86copy ===
ERROR: lib32-target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy basehash changed from b0a44b2c7003b6b4aa3a023d9cb9fe82 to 3a59fa25ddb6a95aff079d477ebf3457
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

ERROR: target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy basehash changed from 9e44f1deb3d15886ee96db1a3332764c to 6b417d08a5113c9b06d13b3681f5ab4f
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

It's using:
inherit allarch

python() {
# Put the package somewhere separate to ensure it's never used except # when we want it
# (note that we have to do this in anonymous python here to avoid # allarch.bbclass disabling itself) d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
}

and DUMMYARCH = "sdk-provides-dummy-target"

The difference as shown with bitbake -e before and after reverting this commit:

before revert:
# $SSTATE_MANMACH [2 operations]
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
# set sstate.bbclass:100 [__anon_111_oe_core_meta_classes_sstate_bbclass]
# "machineName"

# pre-expansion value:
#   "machineName"
SSTATE_MANMACH="machineName"

# $SSTATE_PKGARCH
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
SSTATE_PKGARCH="sdk-provides-dummy-target"

# $PACKAGE_ARCH [3 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

after revert:
# $SSTATE_MANMACH
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
SSTATE_MANMACH="allarch"

# $SSTATE_PKGARCH [2 operations]
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
# set sstate.bbclass:98 [__anon_111__oe_core_meta_classes_sstate_bbclass]
# "allarch"

# pre-expansion value:
#   "allarch"
SSTATE_PKGARCH="allarch"

# $PACKAGE_ARCH [4 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set oe-core/meta/classes/allarch.bbclass:5
# "all"
# set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

the relevant part of the anonymous python in sstate.bbclass:

    elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH") == "all":
        d.setVar('SSTATE_PKGARCH', "allarch")
    else:
        d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))

So with your change, the PACKAGE_ARCH isn't set to "all" because multilib is enabled, but that causes sstate.bbclass to set SSTATE_MANMACH to MACHINE instead of SSTATE_PKGARCH allarch, where it got MACHINE is still a bit of mystery to me.

Cheers,

Quoted 103 lines
Quoted 98 lines

Cheers,

Quoted 89 lines
Quoted 86 lines
meta/classes/allarch.bbclass +0 -0
 python () {
     # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
     return "yes"
 
 def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
 def icecc_is_kernel(bb, d):
     return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
         raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
     # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
         return
 
     if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
     if key in data:
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
             return pkg
         return data[key]
 
@@ -1413,7 +1414,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
     workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
 }
Signature · 7 lines
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#6 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

Quoted 181 lines · Martin Jansa
Quoted 93 lines · Martin Jansa
Quoted 84 lines · Martin Jansa
Quoted 78 lines · Martin Jansa
Quoted 35 lines · On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
  meta/classes/allarch.bbclass         | 12 +++++++++++-
  meta/classes/icecc.bbclass           |  2 +-
  meta/classes/multilib.bbclass        |  3 ++-
  meta/classes/multilib_global.bbclass |  4 +---
  meta/classes/package.bbclass         |  9 ++++++---
  5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +1 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
  # This class is used for architecture independent recipes/data files (usually scripts)
  #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {

meta/classes/allarch.bbclass line 15

Quoted 10 lines
meta/classes/allarch.bbclass +10 -0
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH through another bbclass, but then overwritten with "all" by allarch_package_arch_handler:

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11
# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in oe-core I get:

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set /OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb:9
# "${MACHINE_ARCH}"
# set? /OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12
# "all"

Quoted 5 lines
# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Quoted 8 lines

Now I see the difference, I was still living in the days when "disabling" allarch was possible just by setting PACKAGE_ARCH before inheritting allarch, but now I see that packagegroups do conditional inherit as well since:
http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e
http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab
so I'll modify currently failing recipes to do the same and stop inheritting allarch when PACKAGE_ARCH is set to something else.

Quoted 4 lines

From public layers I've found with test-signatures script only
fbset-nodes recipe in meta-oe which was setting PACKAGE_ARCH after allarch inherit, allarch removal sent here:
http://lists.openembedded.org/pipermail/openembedded-devel/2018-September/120560.html

target-sdk-provides-dummy seems to be affected as well:
=== Comparing signatures for task do_populate_sysroot.sigdata between qemux86 and qemux86copy ===
ERROR: lib32-target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy basehash changed from b0a44b2c7003b6b4aa3a023d9cb9fe82 to 3a59fa25ddb6a95aff079d477ebf3457
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

ERROR: target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy basehash changed from 9e44f1deb3d15886ee96db1a3332764c to 6b417d08a5113c9b06d13b3681f5ab4f
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

It's using:
inherit allarch

python() {
# Put the package somewhere separate to ensure it's never used except # when we want it
# (note that we have to do this in anonymous python here to avoid # allarch.bbclass disabling itself) d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
}

and DUMMYARCH = "sdk-provides-dummy-target"

The difference as shown with bitbake -e before and after reverting this commit:

before revert:
# $SSTATE_MANMACH [2 operations]
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
# set sstate.bbclass:100 [__anon_111_oe_core_meta_classes_sstate_bbclass]
# "machineName"

# pre-expansion value:
#   "machineName"
SSTATE_MANMACH="machineName"

# $SSTATE_PKGARCH
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
SSTATE_PKGARCH="sdk-provides-dummy-target"

# $PACKAGE_ARCH [3 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

after revert:
# $SSTATE_MANMACH
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
SSTATE_MANMACH="allarch"

# $SSTATE_PKGARCH [2 operations]
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
# set sstate.bbclass:98 [__anon_111__oe_core_meta_classes_sstate_bbclass]
# "allarch"

# pre-expansion value:
#   "allarch"
SSTATE_PKGARCH="allarch"

# $PACKAGE_ARCH [4 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set oe-core/meta/classes/allarch.bbclass:5
# "all"
# set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

the relevant part of the anonymous python in sstate.bbclass:

Quoted 8 lines
     elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH") == "all":
         d.setVar('SSTATE_PKGARCH', "allarch")
     else:
         d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))

So with your change, the PACKAGE_ARCH isn't set to "all" because multilib is enabled, but that causes sstate.bbclass to set SSTATE_MANMACH to MACHINE instead of SSTATE_PKGARCH allarch, where it got MACHINE is still a bit of mystery to me.

The original story is that multilib packages such as lib32-curl depends on non-multilib package openssl that allarch package ca-certificates is in the dependency chain:

lib32-curl -> ca-certificates -> openssl

I sent some versions of commits to Richard but he thought these solutions affect current non-multilib build too much. And Richard proposed this solution which not affect current non-multilib build. When multilib is enabled/used, allarch packages are eliminated and treated as common packages. The vars SSTATE_*  are set as the same as normal packages such as zlib.

Package target-sdk-provides-dummy is a little special that it sets its PACKAGE_ARCH in its own recipe. And affects vars which depends on PACKAGE_ARCH.

Regards,
Kai

Quoted 103 lines

Cheers,

Quoted 98 lines
Quoted 94 lines

Cheers,

Quoted 88 lines
Quoted 86 lines
meta/classes/allarch.bbclass +0 -0
  python () {
      # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
      return "yes"
 
  def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
  def icecc_is_kernel(bb, d):
      return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
      if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
          raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
          raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
      # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
          return
 
      if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
              variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
              import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
      if key in data:
          # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
              return pkg
          return data[key]
 
@@ -1413,7 +1414,8 @@ fi
      if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
          write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
          write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
      workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
      if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
          write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
          write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
  }
Signature · 7 lines
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 2 lines
Regards,
Neil | Kai Kang
#7 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

Quoted 204 lines · Kang Kai
Quoted 181 lines · Martin Jansa
Quoted 93 lines · Martin Jansa
Quoted 84 lines · Martin Jansa
Quoted 78 lines · Martin Jansa
Quoted 35 lines · On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is still wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
  meta/classes/allarch.bbclass         | 12 +++++++++++-
  meta/classes/icecc.bbclass           |  2 +-
  meta/classes/multilib.bbclass        |  3 ++-
  meta/classes/multilib_global.bbclass |  4 +---
  meta/classes/package.bbclass         |  9 ++++++---
  5 files changed, 21 insertions(+), 9 deletions(-)
meta/classes/allarch.bbclass +1 -1
index 1eebe0bf2e..45f62a5939 100644
@@ -2,7 +2,17 @@
  # This class is used for architecture independent recipes/data files (usually scripts)
  #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {

meta/classes/allarch.bbclass line 15

Quoted 10 lines
meta/classes/allarch.bbclass +10 -0
+    if bb.data.inherits_class("nativesdk", d) or bb.data.inherits_class("crosssdk", d):
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise"

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH through another bbclass, but then overwritten with "all" by allarch_package_arch_handler:

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11
# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in oe-core I get:

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set /OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set /OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb:9
# "${MACHINE_ARCH}"
# set? /OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12
# "all"

Quoted 5 lines
# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Quoted 8 lines

Now I see the difference, I was still living in the days when "disabling" allarch was possible just by setting PACKAGE_ARCH before inheritting allarch, but now I see that packagegroups do conditional inherit as well since:
http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e
http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab
so I'll modify currently failing recipes to do the same and stop inheritting allarch when PACKAGE_ARCH is set to something else.

Quoted 4 lines

From public layers I've found with test-signatures script only
fbset-nodes recipe in meta-oe which was setting PACKAGE_ARCH after allarch inherit, allarch removal sent here:
http://lists.openembedded.org/pipermail/openembedded-devel/2018-September/120560.html

target-sdk-provides-dummy seems to be affected as well:
=== Comparing signatures for task do_populate_sysroot.sigdata between qemux86 and qemux86copy ===
ERROR: lib32-target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy basehash changed from b0a44b2c7003b6b4aa3a023d9cb9fe82 to 3a59fa25ddb6a95aff079d477ebf3457
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

ERROR: target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy basehash changed from 9e44f1deb3d15886ee96db1a3332764c to 6b417d08a5113c9b06d13b3681f5ab4f
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

It's using:
inherit allarch

python() {
# Put the package somewhere separate to ensure it's never used except # when we want it
# (note that we have to do this in anonymous python here to avoid # allarch.bbclass disabling itself) d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
}

and DUMMYARCH = "sdk-provides-dummy-target"

The difference as shown with bitbake -e before and after reverting this commit:

before revert:
# $SSTATE_MANMACH [2 operations]
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
# set sstate.bbclass:100 [__anon_111_oe_core_meta_classes_sstate_bbclass]
# "machineName"

# pre-expansion value:
#   "machineName"
SSTATE_MANMACH="machineName"

# $SSTATE_PKGARCH
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
SSTATE_PKGARCH="sdk-provides-dummy-target"

# $PACKAGE_ARCH [3 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

after revert:
# $SSTATE_MANMACH
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
SSTATE_MANMACH="allarch"

# $SSTATE_PKGARCH [2 operations]
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
# set sstate.bbclass:98 [__anon_111__oe_core_meta_classes_sstate_bbclass]
# "allarch"

# pre-expansion value:
#   "allarch"
SSTATE_PKGARCH="allarch"

# $PACKAGE_ARCH [4 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set oe-core/meta/classes/allarch.bbclass:5
# "all"
# set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

the relevant part of the anonymous python in sstate.bbclass:

Quoted 8 lines
     elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH") == "all":
         d.setVar('SSTATE_PKGARCH', "allarch")
     else:
         d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))

So with your change, the PACKAGE_ARCH isn't set to "all" because multilib is enabled, but that causes sstate.bbclass to set SSTATE_MANMACH to MACHINE instead of SSTATE_PKGARCH allarch, where it got MACHINE is still a bit of mystery to me.

The original story is that multilib packages such as lib32-curl depends on non-multilib package openssl that allarch package ca-certificates is in the dependency chain:

lib32-curl -> ca-certificates -> openssl

I sent some versions of commits to Richard but he thought these solutions affect current non-multilib build too much. And Richard proposed this solution which not affect current non-multilib build. When multilib is enabled/used, allarch packages are eliminated and treated as common packages. The vars SSTATE_*  are set as the same as normal packages such as zlib.

Quoted 3 lines

Package target-sdk-provides-dummy is a little special that it sets its PACKAGE_ARCH in its own recipe. And affects vars which depends on PACKAGE_ARCH.

I've sent possible work around:
http://lists.openembedded.org/pipermail/openembedded-core/2018-September/155743.html

Quoted 112 lines

Regards,
Kai

Quoted 103 lines

Cheers,

Quoted 98 lines
Quoted 94 lines

Cheers,

Quoted 88 lines
Quoted 86 lines
meta/classes/allarch.bbclass +0 -0
  python () {
      # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +1 -1
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
      return "yes"
 
  def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
  def icecc_is_kernel(bb, d):
      return \
meta/classes/multilib.bbclass +2 -1
index f2ac8bdfef..7b4d6472b0 100644
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
      if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
          raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
          raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
      # Expand this since this won't work correctly once we set a multilib into place
meta/classes/multilib_global.bbclass +1 -3
index d2ec1adfea..1bb62427b0 100644
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
          return
 
      if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
              variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
              import oe.classextend
meta/classes/package.bbclass +6 -3
index 0b6f65a855..d1e9138c66 100644
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
      if key in data:
          # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
              return pkg
          return data[key]
 
@@ -1413,7 +1414,8 @@ fi
      if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
          write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
          write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
      workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
      if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
          write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
          write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
  }
Signature · 7 lines
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 2 lines
Regards,
Neil | Kai Kang
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#8 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

In reply to Kang Kai

I'm resurrecting this thread because this change negatively affects our use of multilib. The use case that this is fixing seems to be a a case that would be a better fit for multiconfig than it would multilib. My interpretation of the use cases of multilib and multiconfig is as follows and someone can correct me if this is wrong.

Multilib allows images to be built that support multiple architectures on the same image. Specifically this use case is interesting for cases where some library or tool has to be 32-bit (for whatever reason might apply) but the rest of the image is 64-bit. For example we have a 32-bit library from a third party vendor and that vendor won't provide us with a 64-bit version. So we want the majority of our system to be 64-bit but need multilib to support the subset of our image that needs to be 32-bit. The result is that some portion of our image has to be 32-bit but whenever possible we'd like to be using the 64-bit packages to reduce duplicating packages between 32 and 64 bit.

Multiconfig allows for multiple configs and seems well suited to cases where there are separate images for each config. So you could have a 32-bit image from one config and a 64-bit image from another config. If no image cross-contamination is required, as seems to be the intent of the request here, then multiconfig can ensure that while not reducing the usefulness of allarch. The original scenario seemed to follow this pattern where there is a lib32-core-image-sato and a core-image-sato.

In our multilib case we want the behavior from before this change. So in the specific use case of 'lib32-curl -> ca-certificate -> openssl' we actually want this. The reason behind this being the desired behavior is that the main architecture would certainly already require openssl so adding the 32-bit version would cause duplication and therefore increase our images size unnecessarily. In the past we had actually found that installing some duplicate things that overlapped like "/usr/bin/openssl" would cause racey behavior where sometimes we got the 32-bit version and others we got the 64-bit version.

Additionally the removal of allarch from all multilib builds also seem like a poor choice as multilib builds now lose all of the benefits that are generally available from allarch.

Quoted 375 lines · Kang Kai
Quoted 4 lines · Martin Jansa
Quoted 3 lines · Martin Jansa
Quoted 2 lines · Martin Jansa
Quoted 1 line · Martin Jansa

On Thu, Sep 06, 2018 at 11:52:24PM +0800, [email protected]

Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

From: Kai Kang <[email protected]>

Some allarch packages rdepends non-allarch packages. when multilib is used, it doesn't expand the dependency chain correctly, e.g.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is

still

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

wrongly required.

Only enable allarch when multilib is not used to fix the issue.

---
  meta/classes/allarch.bbclass         | 12 +++++++++++-
  meta/classes/icecc.bbclass           |  2 +-
  meta/classes/multilib.bbclass        |  3 ++-
  meta/classes/multilib_global.bbclass |  4 +---
  meta/classes/package.bbclass         |  9 ++++++---
  5 files changed, 21 insertions(+), 9 deletions(-)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/classes/allarch.bbclass

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

meta/classes/allarch.bbclass line 2

Quoted 5 lines

index 1eebe0bf2e..45f62a5939 100644

meta/classes/allarch.bbclass +0 -0
@@ -2,7 +2,17 @@
  # This class is used for architecture independent recipes/data

files (usually scripts)

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

meta/classes/allarch.bbclass

Quoted 5 lines
meta/classes/allarch.bbclass +2 -1
  #
 
-PACKAGE_ARCH = "all"
+python allarch_package_arch_handler () {
+    if bb.data.inherits_class("nativesdk", d) or

bb.data.inherits_class("crosssdk", d):

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

meta/classes/allarch.bbclass

Quoted 9 lines
meta/classes/allarch.bbclass +9 -0
+        return
+
+    variants = d.getVar("MULTILIB_VARIANTS")
+    if not variants:
+        d.setVar("PACKAGE_ARCH", "all" )
+}
+
+addhandler allarch_package_arch_handler
+allarch_package_arch_handler[eventmask] =

"bb.event.RecipePreFinalise"

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Maybe I'm overlooking something, but doesn't this overwrite whatever PACKAGE_ARCH as set before this?

I have some recipes where the PACKAGE_ARCH is set to MACHINE_ARCH

through

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

another bbclass, but then overwritten with "all" by

allarch_package_arch_handler:

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

# $PACKAGE_ARCH [5 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set meta-lg-webos/meta-webos/conf/distro/include/webos.inc:241
# "${MACHINE_ARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set

meta-lg-webos/meta-webos/classes/webos_machine_impl_dep.bbclass:11

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

# "${MACHINE_ARCH}"
# set allarch.bbclass:12 [allarch_package_arch_handler]
# "all"

# pre-expansion value:
#   "all"
PACKAGE_ARCH="all"

But surprisingly if I do the same with e.g. packagegroup-core-boot in

oe-core I get:

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

# $PACKAGE_ARCH [4 operations]
# set /OE/build/oe-core/openembedded-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set

/OE/build/oe-core/openembedded-core/meta/conf/documentation.conf:304

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

# [doc] "The architecture of the resulting package or packages."
# set

/OE/build/oe-core/openembedded-core/meta/recipes-core/packagegroups/ packagegroup-core-boot.bb:9

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

# "${MACHINE_ARCH}"
# set?

/OE/build/oe-core/openembedded-core/meta/classes/packagegroup.bbclass:12

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines

# "all"

# pre-expansion value:
#   "${MACHINE_ARCH}"
PACKAGE_ARCH="qemux86_64"

Why isn't allarch_package_arch_handler executed in the 2nd case?

Now I see the difference, I was still living in the days when "disabling" allarch was possible just by setting PACKAGE_ARCH before inheritting allarch, but now I see that packagegroups do conditional inherit as well since:

http://git.openembedded.org/openembedded-core/commit/?id=9c826962ec8fa45c2b035427442b90a41517144e

Quoted 1 line
Quoted 1 line
Quoted 1 line

http://git.openembedded.org/openembedded-core/commit/?id=2c9b1d304daade7b0907320aeb9c522e7ab9dcab

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

so I'll modify currently failing recipes to do the same and stop inheritting allarch when PACKAGE_ARCH is set to something else.

From public layers I've found with test-signatures script only
fbset-nodes recipe in meta-oe which was setting PACKAGE_ARCH after allarch inherit, allarch removal sent here:

http://lists.openembedded.org/pipermail/openembedded-devel/2018-September/120560.html

Quoted 2 lines

target-sdk-provides-dummy seems to be affected as well:
=== Comparing signatures for task do_populate_sysroot.sigdata between

qemux86 and qemux86copy ===

Quoted 1 line

ERROR: lib32-target-sdk-provides-dummy different signature for task

do_populate_sysroot.sigdata between qemux86 and qemux86copy

Quoted 1 line

basehash changed from b0a44b2c7003b6b4aa3a023d9cb9fe82 to

3a59fa25ddb6a95aff079d477ebf3457

Quoted 3 lines

Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

ERROR: target-sdk-provides-dummy different signature for task

do_populate_sysroot.sigdata between qemux86 and qemux86copy

Quoted 1 line

basehash changed from 9e44f1deb3d15886ee96db1a3332764c to

6b417d08a5113c9b06d13b3681f5ab4f

Quoted 8 lines

Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

It's using:
inherit allarch

python() {
# Put the package somewhere separate to ensure it's never used

except

Quoted 9 lines
     # when we want it
     # (note that we have to do this in anonymous python here to avoid
     # allarch.bbclass disabling itself)
     d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
}

and DUMMYARCH = "sdk-provides-dummy-target"

The difference as shown with bitbake -e before and after reverting this

commit:

Quoted 6 lines

before revert:
# $SSTATE_MANMACH [2 operations]
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
# set sstate.bbclass:100

[__anon_111_oe_core_meta_classes_sstate_bbclass]

Quoted 10 lines

# "machineName"

# pre-expansion value:
#   "machineName"
SSTATE_MANMACH="machineName"

# $SSTATE_PKGARCH
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
SSTATE_PKGARCH="sdk-provides-dummy-target"

Quoted 6 lines

# $PACKAGE_ARCH [3 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set dummy-sdk-package.inc:12

[__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]

Quoted 11 lines

# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

after revert:
# $SSTATE_MANMACH
# set? oe-core/meta/classes/sstate.bbclass:61
# "${SSTATE_PKGARCH}"
SSTATE_MANMACH="allarch"

Quoted 4 lines

# $SSTATE_PKGARCH [2 operations]
# set oe-core/meta/classes/sstate.bbclass:11
# "${PACKAGE_ARCH}"
# set sstate.bbclass:98

[__anon_111__oe_core_meta_classes_sstate_bbclass]

Quoted 5 lines

# "allarch"

# pre-expansion value:
#   "allarch"
SSTATE_PKGARCH="allarch"
Quoted 8 lines

# $PACKAGE_ARCH [4 operations]
# set oe-core/meta/conf/bitbake.conf:150
# [_defaultval] "${TUNE_PKGARCH}"
# set oe-core/meta/conf/documentation.conf:304
# [doc] "The architecture of the resulting package or packages."
# set oe-core/meta/classes/allarch.bbclass:5
# "all"
# set dummy-sdk-package.inc:12

[__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]

Quoted 9 lines

# "${DUMMYARCH}"

# pre-expansion value:
#   "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

the relevant part of the anonymous python in sstate.bbclass:

elif bb.data.inherits_class('allarch', d) and

d.getVar("PACKAGE_ARCH") == "all":

Quoted 5 lines
         d.setVar('SSTATE_PKGARCH', "allarch")
     else:
         d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))

So with your change, the PACKAGE_ARCH isn't set to "all" because

multilib is enabled,

Quoted 1 line

but that causes sstate.bbclass to set SSTATE_MANMACH to MACHINE instead

of SSTATE_PKGARCH

Quoted 1 line

allarch, where it got MACHINE is still a bit of mystery to me.

The original story is that multilib packages such as lib32-curl depends on non-multilib package openssl that allarch package ca-certificates is in the dependency chain:

lib32-curl -> ca-certificates -> openssl

I sent some versions of commits to Richard but he thought these solutions affect current non-multilib build too much. And Richard proposed this solution which not affect current non-multilib build. When multilib is enabled/used, allarch packages are eliminated and treated as common packages. The vars SSTATE_* are set as the same as normal packages such as zlib.

Package target-sdk-provides-dummy is a little special that it sets its PACKAGE_ARCH in its own recipe. And affects vars which depends on PACKAGE_ARCH.

Regards,
Kai

Quoted 14 lines

Cheers,

Quoted 11 lines
Quoted 11 lines

Cheers,

Quoted 9 lines
Quoted 9 lines
meta/classes/allarch.bbclass +0 -0
  python () {
      # Allow this class to be included but overridden - only set
meta/classes/icecc.bbclass +0 -0
index 0ca8de86c2..b5a8457747 100644
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
      return "yes"
 
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

meta/classes/icecc.bbclass def use_icecc(bb,d): · line 174

Quoted 2 lines
meta/classes/icecc.bbclass +0 -1
  def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or

bb.data.inherits_class('allarch', d)

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Review

Quoted 5 lines
meta/classes/icecc.bbclass +1 -0
+    return d.getVar("PACKAGE_ARCH") == "all"
 
  def icecc_is_kernel(bb, d):
      return \
(quoted diff) +0 -0

b/meta/classes/multilib.bbclass

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 50

Quoted 5 lines

index f2ac8bdfef..7b4d6472b0 100644

meta/classes/multilib.bbclass +0 -0
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
      if bb.data.inherits_class('nativesdk', e.data) or

bb.data.inherits_class('crosssdk', e.data):

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 51

Quoted 1 line
meta/classes/multilib.bbclass +0 -0
          raise bb.parse.SkipRecipe("We can't extend nativesdk

recipes")

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 52

Quoted 2 lines
meta/classes/multilib.bbclass +0 -1
-    if bb.data.inherits_class('allarch', e.data) and not

bb.data.inherits_class('packagegroup', e.data):

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 52

Quoted 1 line
meta/classes/multilib.bbclass +1 -0
+    if bb.data.inherits_class('allarch', e.data) and not

d.getVar('MULTILIB_VARIANTS') \

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 54

Quoted 2 lines
meta/classes/multilib.bbclass +1 -0
+        and not bb.data.inherits_class('packagegroup', e.data):
          raise bb.parse.SkipRecipe("Don't extend allarch recipes

which are not packagegroups")

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 55

Quoted 2 lines
meta/classes/multilib.bbclass +0 -0
      # Expand this since this won't work correctly once we set a

multilib into place

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/classes/multilib_global.bbclass

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

index d2ec1adfea..1bb62427b0 100644

meta/classes/multilib_global.bbclass +0 -0
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
          return
 
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

meta/classes/multilib_global.bbclass python multilib_virtclass_handler_global () {

Quoted 6 lines
meta/classes/multilib_global.bbclass +1 -3
      if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
              variants = (e.data.getVar("MULTILIB_VARIANTS") or

"").split()

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Review

Quoted 3 lines
meta/classes/multilib_global.bbclass +0 -0
              import oe.classextend
(quoted diff) +0 -0

b/meta/classes/package.bbclass

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

meta/classes/package.bbclass def get_package_mapping (pkg, basepkg, d): · line 496

Quoted 7 lines

index 0b6f65a855..d1e9138c66 100644

meta/classes/package.bbclass +0 -0
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
 
      if key in data:
          # Have to avoid undoing the

write_extra_pkgs(global_variants...)

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/classes/package.bbclass def get_package_mapping (pkg, basepkg, d): · line 497

Quoted 1 line
meta/classes/package.bbclass +0 -1
-        if bb.data.inherits_class('allarch', d) and data[key] ==

basepkg:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/classes/package.bbclass def get_package_mapping (pkg, basepkg, d): · line 497

Quoted 1 line
meta/classes/package.bbclass +1 -0
+        if bb.data.inherits_class('allarch', d) and not

d.getVar('MULTILIB_VARIANTS') \

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

meta/classes/package.bbclass fi · line 1414

Quoted 6 lines
meta/classes/package.bbclass +1 -0
+            and data[key] == basepkg:
              return pkg
          return data[key]
 
@@ -1413,7 +1414,8 @@ fi
      if bb.data.inherits_class('kernel', d) or

bb.data.inherits_class('module-base', d):

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

meta/classes/package.bbclass fi

Quoted 3 lines
meta/classes/package.bbclass +0 -1
          write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not

bb.data.inherits_class('packagegroup', d)):

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

meta/classes/package.bbclass fi · line 1504

Quoted 7 lines
meta/classes/package.bbclass +2 -0
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
          write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
      workdir = d.getVar('WORKDIR')
@@ -1502,7 +1504,8 @@ fi
      if bb.data.inherits_class('kernel', d) or

bb.data.inherits_class('module-base', d):

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

meta/classes/package.bbclass fi

Quoted 3 lines
meta/classes/package.bbclass +0 -1
          write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not

bb.data.inherits_class('packagegroup', d):

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

meta/classes/package.bbclass fi

Quoted 3 lines
meta/classes/package.bbclass +2 -0
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
          write_extra_runtime_pkgs(global_variants, packages,

pkgdatadir)

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 12 lines
Quoted 10 lines
meta/classes/package.bbclass +0 -1
  }
--

2.18.0

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

--
Martin 'JaMa' Jansa jabber: [email protected]

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

--
Martin 'JaMa' Jansa jabber: [email protected]

--
Martin 'JaMa' Jansa jabber: [email protected]

--
Regards,
Neil | Kai Kang

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

#9 lore raw

Re: [PATCH 1/7] allarch: only enable allarch when multilib is not used

Quoted 6 lines · Dan Dedrick

I'm resurrecting this thread because this change negatively affects our use of multilib. The use case that this is fixing seems to be a a case that would be a better fit for multiconfig than it would multilib. My interpretation of the use cases of multilib and multiconfig is as follows and someone can correct me if this is wrong.

I think the problem here is there is no correct answer which will work for everyone.

People don't expect that it would build openssl if you build lib32-curl and you could certainly get systems where only lib32-openssl was used or desired.

I don't think its related to multiconfig, its just that people have different expectations of multilib.

Quoted 11 lines

Multilib allows images to be built that support multiple architectures on the same image. Specifically this use case is interesting for cases where some library or tool has to be 32-bit (for whatever reason might apply) but the rest of the image is 64- bit. For example we have a 32-bit library from a third party vendor and that vendor won't provide us with a 64-bit version. So we want the majority of our system to be 64-bit but need multilib to support the subset of our image that needs to be 32-bit. The result is that some portion of our image has to be 32-bit but whenever possible we'd like to be using the 64-bit packages to reduce duplicating packages between 32 and 64 bit.

For your usecase I can see the justification. The fact remains we had users complaining about this behaviour too though.

Quoted 20 lines

Multiconfig allows for multiple configs and seems well suited to cases where there are separate images for each config. So you could have a 32-bit image from one config and a 64-bit image from another config. If no image cross-contamination is required, as seems to be the intent of the request here, then multiconfig can ensure that while not reducing the usefulness of allarch. The original scenario seemed to follow this pattern where there is a lib32-core-image-sato and a core-image-sato.

In our multilib case we want the behavior from before this change. So in the specific use case of 'lib32-curl -> ca-certificate -> openssl' we actually want this. The reason behind this being the desired behavior is that the main architecture would certainly already require openssl so adding the 32-bit version would cause duplication and therefore increase our images size unnecessarily. In the past we had actually found that installing some duplicate things that overlapped like "/usr/bin/openssl" would cause racey behavior where sometimes we got the 32-bit version and others we got the 64-bit version.

Quoted 3 lines

Additionally the removal of allarch from all multilib builds also seem like a poor choice as multilib builds now lose all of the benefits that are generally available from allarch.

I never liked that side of this either, however, generically fixing the problems reported was effectively "impossible" any other way as far as I could see.

For your use case it should be possible to "coerce" the lib32-X allarch recipes to prefer the "normal" architecture and get the old behaviour back? The main cost would be buildtime of two sets of allarch recipes but that in the scheme of things should be small...

Its a difficult situation which I can see both sides of.

Cheers,

Richard