diff options
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 | ||