summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-11-02 14:55:00 +0800
committerRobert Yang <liezhi.yang@windriver.com>2018-01-08 18:08:32 +0800
commita83c9908715c0a7c3c4f8b498f2f46c4126680d7 (patch)
tree07f9d306d41c5626892e8569f5fc4e57f08bcdf6
parent642acf2b53678062ea5f8a5c316d38ca9117d426 (diff)
downloadopenembedded-core-contrib-a83c9908715c0a7c3c4f8b498f2f46c4126680d7.tar.gz
openembedded-core-contrib-a83c9908715c0a7c3c4f8b498f2f46c4126680d7.tar.bz2
openembedded-core-contrib-a83c9908715c0a7c3c4f8b498f2f46c4126680d7.zip
multilib.bbclass: extend allarch recipes
This can fix do_rootfs and depends chaos when multilib, for example ca-certificates is an allarch recipe: MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "core2-32" IMAGE_INSTALL_append = " ca-certificates" $ bitbake ca-certificates $ rpm -qpR tmp-glibc/deploy/rpm/noarch/ca-certificates-20170717-r0.noarch.rpm [snip] openssl [snip] It requires openssl, but lib32-openssl doesn't proivide it: $ rpm -qp --provides tmp-glibc/deploy/rpm/core2_32/lib32-openssl-1.0.2l-r0.core2_32.rpm lib32-openssl = 1.0.2l-r0 So openssl-1.0.2l-r0.core2_64.rpm would be installed when install ca-certificates, e.g.: MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "core2-32" IMAGE_INSTALL_append = " ca-certificates" $ bitbake lib32-core-image-minimal The openssl-1.0.2l-r0.core2_64.rpm and other 64 bit packages are installed, this is incorrect. We have two solutions on this: 1) Let lib32-openssl provide openssl, but this would cause more problems when building since more than one providers for openssl. Or 2) Extend allarch recipes, there would be ca-certificates-20170717-r0.noarch.rpm and lib32-ca-certificates-20170717-r0.noarch.rpm, then ca-certificates requires openssl, and lib32-ca-certificates requires lib32-openssl, the packages will be installed correctly, this is the best solution that I can find. The problem has existed for years for deb and ipk (rpm did work since it didn't use lib32-BPN in rpm filename before changed to dnf, for example, there was no lib32-openssl.core2_32.rpm, but openssl.core2_32.rpm), this patch can fix the problem for rpm, ipk and deb. [YOCTO #12288] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/classes/allarch.bbclass3
-rw-r--r--meta/classes/multilib.bbclass4
-rw-r--r--meta/classes/multilib_global.bbclass4
-rw-r--r--meta/classes/package.bbclass9
4 files changed, 1 insertions, 19 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index 51ba509cd0..b4f694da71 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -42,9 +42,6 @@ python () {
d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
d.setVar("INHIBIT_PACKAGE_STRIP", "1")
- # These multilib values shouldn't change allarch packages so exclude them
- d.appendVarFlag("emit_pkgdata", "vardepsexclude", " MULTILIB_VARIANTS")
- d.appendVarFlag("write_specfile", "vardepsexclude", " MULTILIBS")
elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d):
bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE"))
}
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index dc0868be3e..770863f8fe 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -46,10 +46,6 @@ python multilib_virtclass_handler () {
if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
raise bb.parse.SkipPackage("We can't extend nativesdk recipes")
- if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
- raise bb.parse.SkipPackage("Don't extend allarch recipes which are not packagegroups")
-
-
# Expand this since this won't work correctly once we set a multilib into place
e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS"))
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index d2ec1adfea..1bb62427b0 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -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
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7dc759699f..ea0217cd89 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -475,9 +475,6 @@ def get_package_mapping (pkg, basepkg, d):
key = "PKG_%s" % pkg
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:
- return pkg
return data[key]
return pkg
@@ -1368,9 +1365,6 @@ python emit_pkgdata() {
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)):
- write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
-
workdir = d.getVar('WORKDIR')
for pkg in packages.split():
@@ -1455,9 +1449,6 @@ python emit_pkgdata() {
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):
- write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
-
bb.utils.unlockfile(lf)
}
emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides"