All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongxiao Xu <dongxiao.xu@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/5] multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc
Date: Fri, 26 Aug 2011 15:52:22 +0800	[thread overview]
Message-ID: <c75c991a2a7ba813aa10ee21e242f41ffff04153.1314344548.git.dongxiao.xu@intel.com> (raw)
In-Reply-To: <cover.1314344548.git.dongxiao.xu@intel.com>
In-Reply-To: <cover.1314344548.git.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.1




  parent reply	other threads:[~2011-08-26  7:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
2011-08-26  7:52 ` [PATCH 1/5] base-passwd: Use BPN in FILES paths Dongxiao Xu
2011-08-26  7:52 ` [PATCH 2/5] bitbake.conf: " Dongxiao Xu
2011-08-26  7:52 ` Dongxiao Xu [this message]
2011-08-26  7:52 ` [PATCH 4/5] multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements Dongxiao Xu
2011-08-26  7:52 ` [PATCH 5/5] multilib.bbclass: add renaming for INITSCRIPT related variables Dongxiao Xu
2011-08-29 13:01 ` [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc 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=c75c991a2a7ba813aa10ee21e242f41ffff04153.1314344548.git.dongxiao.xu@intel.com \
    --to=dongxiao.xu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.