summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass5
-rw-r--r--meta/classes/package.bbclass22
-rw-r--r--meta/classes/populate_sdk_base.bbclass3
3 files changed, 18 insertions, 12 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3cde0b8cba..4e9c29cb8b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -116,8 +116,9 @@ python () {
116 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features))) 116 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
117 117
118 if d.getVar('BB_WORKERCONTEXT', True) is not None: 118 if d.getVar('BB_WORKERCONTEXT', True) is not None:
119 runtime_mapping_rename("PACKAGE_INSTALL", d) 119 pn = d.getVar('PN', True)
120 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) 120 runtime_mapping_rename("PACKAGE_INSTALL", pn, d)
121 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d)
121 122
122 # Ensure we have the vendor list for complementary package handling 123 # Ensure we have the vendor list for complementary package handling
123 ml_vendor_list = "" 124 ml_vendor_list = ""
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
335def get_package_mapping (pkg, d): 335def 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
346def runtime_mapping_rename (varname, d): 349def 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
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 6280705236..49e446986f 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -30,7 +30,8 @@ EXCLUDE_FROM_WORLD = "1"
30SDK_PACKAGING_FUNC ?= "create_shar" 30SDK_PACKAGING_FUNC ?= "create_shar"
31 31
32fakeroot python do_populate_sdk() { 32fakeroot python do_populate_sdk() {
33 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", d) 33 pn = d.getVar('PN', True)
34 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
34 35
35 bb.build.exec_func("populate_sdk_image", d) 36 bb.build.exec_func("populate_sdk_image", d)
36 37