diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-12 17:45:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-13 23:49:28 +0100 |
commit | 093dec12e6b3ade7d8a88782d6b8ec02d935d58c (patch) | |
tree | 0297558e916f71c03f817765fb3f6b97cfb058fd /meta/classes/package.bbclass | |
parent | db61a66dbab8f3eccdefdc42a4e59887d28995ca (diff) | |
download | poky-093dec12e6b3ade7d8a88782d6b8ec02d935d58c.tar.gz |
package/image.bbclass: Fix multilib rprovides
allarch multilib recipes are meant to provide a list of different multilib variants.
Unfortunately since the pkgdata also has mappings for these, they get mapped back to
the original package name which means the effect is undone at package creation time
when the remapping code is called.
This patch adds in a conditional to break that chain meaning the packages get
the correct RPROVIDES and image builds work correctly with opkg.
[YOCTO #3453]
(From OE-Core rev: 1a1927f8a04fe0a2b3b853ebdd33ccb807f00b59)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 826a54e572..4e9b79efe2 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -332,24 +332,27 @@ def copydebugsources(debugsrcdir, d): | |||
332 | # Package data handling routines | 332 | # Package data handling routines |
333 | # | 333 | # |
334 | 334 | ||
335 | def get_package_mapping (pkg, d): | 335 | def get_package_mapping (pkg, basepkg, d): |
336 | import oe.packagedata | 336 | import oe.packagedata |
337 | 337 | ||
338 | data = oe.packagedata.read_subpkgdata(pkg, d) | 338 | data = oe.packagedata.read_subpkgdata(pkg, d) |
339 | key = "PKG_%s" % pkg | 339 | key = "PKG_%s" % pkg |
340 | 340 | ||
341 | if key in data: | 341 | if key in data: |
342 | # Have to avoid undoing the write_extra_pkgs(global_variants...) | ||
343 | if bb.data.inherits_class('allarch', d) and data[key] == basepkg: | ||
344 | return pkg | ||
342 | return data[key] | 345 | return data[key] |
343 | 346 | ||
344 | return pkg | 347 | return pkg |
345 | 348 | ||
346 | def runtime_mapping_rename (varname, d): | 349 | def runtime_mapping_rename (varname, pkg, d): |
347 | #bb.note("%s before: %s" % (varname, d.getVar(varname, True))) | 350 | #bb.note("%s before: %s" % (varname, d.getVar(varname, True))) |
348 | 351 | ||
349 | new_depends = {} | 352 | new_depends = {} |
350 | deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "") | 353 | deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "") |
351 | for depend in deps: | 354 | for depend in deps: |
352 | new_depend = get_package_mapping(depend, d) | 355 | new_depend = get_package_mapping(depend, pkg, d) |
353 | new_depends[new_depend] = deps[depend] | 356 | new_depends[new_depend] = deps[depend] |
354 | 357 | ||
355 | d.setVar(varname, bb.utils.join_deps(new_depends, commasep=False)) | 358 | d.setVar(varname, bb.utils.join_deps(new_depends, commasep=False)) |
@@ -1942,10 +1945,11 @@ def mapping_rename_hook(d): | |||
1942 | Rewrite variables to account for package renaming in things | 1945 | Rewrite variables to account for package renaming in things |
1943 | like debian.bbclass or manual PKG variable name changes | 1946 | like debian.bbclass or manual PKG variable name changes |
1944 | """ | 1947 | """ |
1945 | runtime_mapping_rename("RDEPENDS", d) | 1948 | pkg = d.getVar("PKG", True) |
1946 | runtime_mapping_rename("RRECOMMENDS", d) | 1949 | runtime_mapping_rename("RDEPENDS", pkg, d) |
1947 | runtime_mapping_rename("RSUGGESTS", d) | 1950 | runtime_mapping_rename("RRECOMMENDS", pkg, d) |
1948 | runtime_mapping_rename("RPROVIDES", d) | 1951 | runtime_mapping_rename("RSUGGESTS", pkg, d) |
1949 | runtime_mapping_rename("RREPLACES", d) | 1952 | runtime_mapping_rename("RPROVIDES", pkg, d) |
1950 | runtime_mapping_rename("RCONFLICTS", d) | 1953 | runtime_mapping_rename("RREPLACES", pkg, d) |
1954 | runtime_mapping_rename("RCONFLICTS", pkg, d) | ||
1951 | 1955 | ||