diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2011-08-25 21:30:12 +0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-08-26 12:34:02 -0700 |
commit | ea7c196b4097d64b4f42faccaf075334c297ba20 (patch) | |
tree | b22db61043472cb095046c34d0efa513bbb72355 /meta/classes/multilib.bbclass | |
parent | cb247225a96d57e67ce32c5674bb13b703e30a7c (diff) | |
download | openembedded-core-ea7c196b4097d64b4f42faccaf075334c297ba20.tar.gz openembedded-core-ea7c196b4097d64b4f42faccaf075334c297ba20.tar.bz2 openembedded-core-ea7c196b4097d64b4f42faccaf075334c297ba20.zip |
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.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
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 () { 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() + [""]): |