From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] package/image.bbclass: Fix multilib rprovides
Date: Fri, 12 Apr 2013 17:45:27 +0100 [thread overview]
Message-ID: <1365785127.16702.64.camel@ted> (raw)
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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3cde0b8..4e9c29c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -116,8 +116,9 @@ python () {
d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
if d.getVar('BB_WORKERCONTEXT', True) is not None:
- runtime_mapping_rename("PACKAGE_INSTALL", d)
- runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d)
+ pn = d.getVar('PN', True)
+ runtime_mapping_rename("PACKAGE_INSTALL", pn, d)
+ runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d)
# Ensure we have the vendor list for complementary package handling
ml_vendor_list = ""
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 826a54e..4e9b79e 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -332,24 +332,27 @@ def copydebugsources(debugsrcdir, d):
# Package data handling routines
#
-def get_package_mapping (pkg, d):
+def get_package_mapping (pkg, basepkg, d):
import oe.packagedata
data = oe.packagedata.read_subpkgdata(pkg, d)
key = "PKG_%s" % pkg
if key in data:
+ # Have to avoid undoing the write_extra_pkgs(global_variants...)
+ if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+ return pkg
return data[key]
return pkg
-def runtime_mapping_rename (varname, d):
+def runtime_mapping_rename (varname, pkg, d):
#bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
new_depends = {}
deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "")
for depend in deps:
- new_depend = get_package_mapping(depend, d)
+ new_depend = get_package_mapping(depend, pkg, d)
new_depends[new_depend] = deps[depend]
d.setVar(varname, bb.utils.join_deps(new_depends, commasep=False))
@@ -1942,10 +1945,11 @@ def mapping_rename_hook(d):
Rewrite variables to account for package renaming in things
like debian.bbclass or manual PKG variable name changes
"""
- runtime_mapping_rename("RDEPENDS", d)
- runtime_mapping_rename("RRECOMMENDS", d)
- runtime_mapping_rename("RSUGGESTS", d)
- runtime_mapping_rename("RPROVIDES", d)
- runtime_mapping_rename("RREPLACES", d)
- runtime_mapping_rename("RCONFLICTS", d)
+ pkg = d.getVar("PKG", True)
+ runtime_mapping_rename("RDEPENDS", pkg, d)
+ runtime_mapping_rename("RRECOMMENDS", pkg, d)
+ runtime_mapping_rename("RSUGGESTS", pkg, d)
+ runtime_mapping_rename("RPROVIDES", pkg, d)
+ runtime_mapping_rename("RREPLACES", pkg, d)
+ runtime_mapping_rename("RCONFLICTS", pkg, d)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 6280705..49e4469 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -30,7 +30,8 @@ EXCLUDE_FROM_WORLD = "1"
SDK_PACKAGING_FUNC ?= "create_shar"
fakeroot python do_populate_sdk() {
- runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", d)
+ pn = d.getVar('PN', True)
+ runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
bb.build.exec_func("populate_sdk_image", d)
reply other threads:[~2013-04-12 17:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365785127.16702.64.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox