diff options
author | Kai Kang <kai.kang@windriver.com> | 2018-09-11 19:25:17 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-13 07:42:28 +0100 |
commit | d9ba0219b2f6643ffc825d4b8d3494d07237dd0b (patch) | |
tree | a9b272b8d30c962443cddddf8db9469767de7988 | |
parent | c2d00e2f83cdf3d2923660448756ed29296a06a6 (diff) | |
download | poky-d9ba0219b2f6643ffc825d4b8d3494d07237dd0b.tar.gz |
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>
-rw-r--r-- | meta/classes/allarch.bbclass | 13 | ||||
-rw-r--r-- | meta/classes/icecc.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/multilib.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/multilib_global.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 9 |
5 files changed, 22 insertions, 9 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass index 1eebe0bf2e..5bd5c44a27 100644 --- a/meta/classes/allarch.bbclass +++ b/meta/classes/allarch.bbclass | |||
@@ -2,7 +2,18 @@ | |||
2 | # This class is used for architecture independent recipes/data files (usually scripts) | 2 | # This class is used for architecture independent recipes/data files (usually scripts) |
3 | # | 3 | # |
4 | 4 | ||
5 | PACKAGE_ARCH = "all" | 5 | python allarch_package_arch_handler () { |
6 | if bb.data.inherits_class("native", d) or bb.data.inherits_class("nativesdk", d) \ | ||
7 | or bb.data.inherits_class("crosssdk", d): | ||
8 | return | ||
9 | |||
10 | variants = d.getVar("MULTILIB_VARIANTS") | ||
11 | if not variants: | ||
12 | d.setVar("PACKAGE_ARCH", "all" ) | ||
13 | } | ||
14 | |||
15 | addhandler allarch_package_arch_handler | ||
16 | allarch_package_arch_handler[eventmask] = "bb.event.RecipePreFinalise" | ||
6 | 17 | ||
7 | python () { | 18 | python () { |
8 | # Allow this class to be included but overridden - only set | 19 | # Allow this class to be included but overridden - only set |
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 0ca8de86c2..b5a8457747 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
@@ -171,7 +171,7 @@ def use_icecc(bb,d): | |||
171 | return "yes" | 171 | return "yes" |
172 | 172 | ||
173 | def icecc_is_allarch(bb, d): | 173 | def icecc_is_allarch(bb, d): |
174 | return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d) | 174 | return d.getVar("PACKAGE_ARCH") == "all" |
175 | 175 | ||
176 | def icecc_is_kernel(bb, d): | 176 | def icecc_is_kernel(bb, d): |
177 | return \ | 177 | return \ |
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index f2ac8bdfef..7b4d6472b0 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass | |||
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () { | |||
50 | if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): | 50 | if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): |
51 | raise bb.parse.SkipRecipe("We can't extend nativesdk recipes") | 51 | raise bb.parse.SkipRecipe("We can't extend nativesdk recipes") |
52 | 52 | ||
53 | if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data): | 53 | if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \ |
54 | and not bb.data.inherits_class('packagegroup', e.data): | ||
54 | raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups") | 55 | raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups") |
55 | 56 | ||
56 | # Expand this since this won't work correctly once we set a multilib into place | 57 | # Expand this since this won't work correctly once we set a multilib into place |
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 () { | |||
165 | return | 165 | return |
166 | 166 | ||
167 | if bb.data.inherits_class('kernel', e.data) or \ | 167 | if bb.data.inherits_class('kernel', e.data) or \ |
168 | bb.data.inherits_class('module-base', e.data) or \ | 168 | bb.data.inherits_class('module-base', e.data): |
169 | (bb.data.inherits_class('allarch', e.data) and\ | ||
170 | not bb.data.inherits_class('packagegroup', e.data)): | ||
171 | variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split() | 169 | variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split() |
172 | 170 | ||
173 | import oe.classextend | 171 | import oe.classextend |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 0b6f65a855..d1e9138c66 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -494,7 +494,8 @@ def get_package_mapping (pkg, basepkg, d): | |||
494 | 494 | ||
495 | if key in data: | 495 | if key in data: |
496 | # Have to avoid undoing the write_extra_pkgs(global_variants...) | 496 | # Have to avoid undoing the write_extra_pkgs(global_variants...) |
497 | if bb.data.inherits_class('allarch', d) and data[key] == basepkg: | 497 | if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \ |
498 | and data[key] == basepkg: | ||
498 | return pkg | 499 | return pkg |
499 | return data[key] | 500 | return data[key] |
500 | 501 | ||
@@ -1413,7 +1414,8 @@ fi | |||
1413 | if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): | 1414 | if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): |
1414 | write_extra_pkgs(variants, pn, packages, pkgdatadir) | 1415 | write_extra_pkgs(variants, pn, packages, pkgdatadir) |
1415 | 1416 | ||
1416 | if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)): | 1417 | if bb.data.inherits_class('allarch', d) and not variants \ |
1418 | and not bb.data.inherits_class('packagegroup', d): | ||
1417 | write_extra_pkgs(global_variants, pn, packages, pkgdatadir) | 1419 | write_extra_pkgs(global_variants, pn, packages, pkgdatadir) |
1418 | 1420 | ||
1419 | workdir = d.getVar('WORKDIR') | 1421 | workdir = d.getVar('WORKDIR') |
@@ -1502,7 +1504,8 @@ fi | |||
1502 | if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): | 1504 | if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): |
1503 | write_extra_runtime_pkgs(variants, packages, pkgdatadir) | 1505 | write_extra_runtime_pkgs(variants, packages, pkgdatadir) |
1504 | 1506 | ||
1505 | if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d): | 1507 | if bb.data.inherits_class('allarch', d) and not variants \ |
1508 | and not bb.data.inherits_class('packagegroup', d): | ||
1506 | write_extra_runtime_pkgs(global_variants, packages, pkgdatadir) | 1509 | write_extra_runtime_pkgs(global_variants, packages, pkgdatadir) |
1507 | 1510 | ||
1508 | } | 1511 | } |