diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2011-08-25 21:30:12 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-29 13:48:04 +0100 |
commit | 45f805a6c85f360a58ce0b41f07db602c547b3dc (patch) | |
tree | 53b27b943aed499d6fcff0cf7e06bb23f4dae784 /meta/classes/multilib.bbclass | |
parent | ae2a8947567930c058e388b326986ab0e56d0d57 (diff) | |
download | poky-45f805a6c85f360a58ce0b41f07db602c547b3dc.tar.gz |
multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc
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.
(From OE-Core rev: ea7c196b4097d64b4f42faccaf075334c297ba20)
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/multilib.bbclass')
-rw-r--r-- | 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 571b7be961..46c24e1dec 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass | |||
@@ -63,20 +63,18 @@ python __anonymous () { | |||
63 | newvar.append(extend_name(v)) | 63 | newvar.append(extend_name(v)) |
64 | d.setVar(varname, " ".join(newvar)) | 64 | d.setVar(varname, " ".join(newvar)) |
65 | 65 | ||
66 | pkgs = [] | 66 | pkgs_mapping = [] |
67 | pkgrename = {} | ||
68 | for pkg in (d.getVar("PACKAGES", True) or "").split(): | 67 | for pkg in (d.getVar("PACKAGES", True) or "").split(): |
69 | if pkg.startswith(variant): | 68 | if pkg.startswith(variant): |
70 | pkgs.append(pkg) | 69 | pkgs_mapping.append([pkg.split(variant + "-")[1], pkg]) |
71 | continue | 70 | continue |
72 | pkgrename[pkg] = extend_name(pkg) | 71 | pkgs_mapping.append([pkg, extend_name(pkg)]) |
73 | pkgs.append(pkgrename[pkg]) | ||
74 | 72 | ||
75 | if pkgrename: | 73 | d.setVar("PACKAGES", " ".join([row[1] for row in pkgs_mapping])) |
76 | d.setVar("PACKAGES", " ".join(pkgs)) | 74 | |
77 | for pkg in pkgrename: | 75 | for pkg_mapping in pkgs_mapping: |
78 | for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]: | 76 | for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]: |
79 | d.renameVar("%s_%s" % (subs, pkg), "%s_%s" % (subs, pkgrename[pkg])) | 77 | d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1])) |
80 | 78 | ||
81 | map_dependencies("DEPENDS", d) | 79 | map_dependencies("DEPENDS", d) |
82 | for pkg in (d.getVar("PACKAGES", True).split() + [""]): | 80 | for pkg in (d.getVar("PACKAGES", True).split() + [""]): |