mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
allarch: only enable allarch when multilib is not used
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. (From OE-Core rev: a23c482cab4f874f4a6a6889716123569eb5ece9) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -2,7 +2,18 @@
|
|||||||
# This class is used for architecture independent recipes/data files (usually scripts)
|
# 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("native", d) or 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 () {
|
python () {
|
||||||
# Allow this class to be included but overridden - only set
|
# Allow this class to be included but overridden - only set
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
|
|||||||
return "yes"
|
return "yes"
|
||||||
|
|
||||||
def icecc_is_allarch(bb, d):
|
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):
|
def icecc_is_kernel(bb, d):
|
||||||
return \
|
return \
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
|
|||||||
if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
|
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")
|
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")
|
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
|
# Expand this since this won't work correctly once we set a multilib into place
|
||||||
|
|||||||
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
|
|||||||
return
|
return
|
||||||
|
|
||||||
if bb.data.inherits_class('kernel', e.data) or \
|
if bb.data.inherits_class('kernel', e.data) or \
|
||||||
bb.data.inherits_class('module-base', e.data) or \
|
bb.data.inherits_class('module-base', e.data):
|
||||||
(bb.data.inherits_class('allarch', e.data) and\
|
|
||||||
not bb.data.inherits_class('packagegroup', e.data)):
|
|
||||||
variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
|
variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
|
||||||
|
|
||||||
import oe.classextend
|
import oe.classextend
|
||||||
|
|||||||
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d):
|
|||||||
|
|
||||||
if key in data:
|
if key in data:
|
||||||
# Have to avoid undoing the write_extra_pkgs(global_variants...)
|
# 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 pkg
|
||||||
return data[key]
|
return data[key]
|
||||||
|
|
||||||
@@ -1413,7 +1414,8 @@ fi
|
|||||||
if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
|
if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
|
||||||
write_extra_pkgs(variants, pn, packages, pkgdatadir)
|
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)
|
write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
|
||||||
|
|
||||||
workdir = d.getVar('WORKDIR')
|
workdir = d.getVar('WORKDIR')
|
||||||
@@ -1502,7 +1504,8 @@ fi
|
|||||||
if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
|
if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
|
||||||
write_extra_runtime_pkgs(variants, packages, pkgdatadir)
|
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)
|
write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user