Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [CONSOLIDATED PULL 15/21] multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc
Date: Fri, 26 Aug 2011 12:39:45 -0700	[thread overview]
Message-ID: <ea7c196b4097d64b4f42faccaf075334c297ba20.1314387279.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1314387279.git.sgw@linux.intel.com>
In-Reply-To: <cover.1314387279.git.sgw@linux.intel.com>

From: Dongxiao Xu <dongxiao.xu@intel.com>

In the orignal logic, the renaming will not work for "FILES_" if defined
variables as:

PACKAGES = "${PN}"
FILES_abc = "/usr/include/abc.h"

It is because ${PN} is "lib64-abc" so it will not be contained in
pkgrename.

This commit enumerates all element in PACKAGES, getting the original
packages and multilib packages, then doing renaming for "FILES_",
"RDEPENDS_", etc. This fixes a lot of missing files and incorrect
dependencies.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 571b7be..46c24e1 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -63,20 +63,18 @@ python __anonymous () {
             newvar.append(extend_name(v))
         d.setVar(varname, " ".join(newvar))
 
-    pkgs = []
-    pkgrename = {}
+    pkgs_mapping = []
     for pkg in (d.getVar("PACKAGES", True) or "").split():
         if pkg.startswith(variant):
-            pkgs.append(pkg)
+            pkgs_mapping.append([pkg.split(variant + "-")[1], pkg])
             continue
-        pkgrename[pkg] = extend_name(pkg)
-        pkgs.append(pkgrename[pkg])
+        pkgs_mapping.append([pkg, extend_name(pkg)])
 
-    if pkgrename:
-        d.setVar("PACKAGES", " ".join(pkgs))
-        for pkg in pkgrename:
-            for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]:
-                d.renameVar("%s_%s" % (subs, pkg), "%s_%s" % (subs, pkgrename[pkg]))
+    d.setVar("PACKAGES", " ".join([row[1] for row in pkgs_mapping]))
+
+    for pkg_mapping in pkgs_mapping:
+        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]:
+            d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
 
     map_dependencies("DEPENDS", d)
     for pkg in (d.getVar("PACKAGES", True).split() + [""]):
-- 
1.7.6




  parent reply	other threads:[~2011-08-26 19:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 19:39 [CONSOLIDATED PULL 00/21] Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 01/21] gcc-4.6: Drop gcc-poison-parameters.patch as its not need Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 02/21] gcc-4.5.1: Drop gcc-poison-parameters.patch, replace with bug fix patch Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 03/21] script/runqemu: change boot command line for qemuppc Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 04/21] package.bbclass: Fix recrdeptask of image type recipes Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 05/21] [YOCTO #1396] Fix adt-installer for consistent naming for powerpc and add all arch template for installation Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 06/21] bitbake.conf: set includedir_nativesdk Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 07/21] qt4-tools-nativesdk: remove gcc standard paths Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 08/21] cmake-nativesdk: " Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 09/21] kernel.bbclass: support kernel image type of vmlinux.gz Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 10/21] scripts/runqemu: disable unfs boot mode for qemuppc Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 11/21] linux-yocto-rt: qemumips: fix boot panic Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 12/21] qt4e-demo-image: Fix bug 999 Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 13/21] base-passwd: Use BPN in FILES paths Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 14/21] bitbake.conf: " Saul Wold
2011-08-26 19:39 ` Saul Wold [this message]
2011-08-26 19:39 ` [CONSOLIDATED PULL 16/21] multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 17/21] multilib.bbclass: add renaming for INITSCRIPT related variables Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 18/21] eglibc: fix gconv packaging after 5486cac29db6e67051fff7637a0abc9aeab661e5 Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 19/21] opkg-utils: ignore packages disapperaring filelist generation Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 20/21] pango: make x11 support conditional on DISTRO_FEATURES Saul Wold
2011-08-26 19:39 ` [CONSOLIDATED PULL 21/21] kernel.bbclass: Find the kernel consistently Saul Wold
2011-08-29 12:48 ` [CONSOLIDATED PULL 00/21] Richard Purdie

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=ea7c196b4097d64b4f42faccaf075334c297ba20.1314387279.git.sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --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