summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-02-25 14:36:17 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-25 17:50:26 +0000
commit16d271c14bd2f98391aee52a11593480acefee6b (patch)
tree3eae8a07162503bfb6652daf4e8c931ea52334e4
parent72576e2d04dc8b43ae0d7f31cddd74318f52103e (diff)
downloadpoky-16d271c14bd2f98391aee52a11593480acefee6b.tar.gz
poky-16d271c14bd2f98391aee52a11593480acefee6b.tar.bz2
poky-16d271c14bd2f98391aee52a11593480acefee6b.zip
package_manager.py: create index files for all backends in PACKAGE_CLASSES
The previous implementation was checking IMAGE_PKGTYPE and created the index files just for the backend used to create the image. Apparently, 'bitbake package-index' should attempt to create the index files for all backends specified in PACKAGE_CLASSES. [YOCTO #5827] (From OE-Core rev: 0521d48a1612bfc735e2c86acc9b685c1dc389ef) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index d29adaca7b..ff4f1dee03 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1519,19 +1519,25 @@ class DpkgPM(PackageManager):
def generate_index_files(d):
- img_type = d.getVar('IMAGE_PKGTYPE', True)
+ classes = d.getVar('PACKAGE_CLASSES', True).replace("package_", "").split()
+
+ indexer_map = {
+ "rpm": (RpmIndexer, d.getVar('DEPLOY_DIR_RPM', True)),
+ "ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK', True)),
+ "deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB', True))
+ }
result = None
- if img_type == "rpm":
- result = RpmIndexer(d, d.getVar('DEPLOY_DIR_RPM', True)).write_index()
- elif img_type == "ipk":
- result = OpkgIndexer(d, d.getVar('DEPLOY_DIR_IPK', True)).write_index()
- elif img_type == "deb":
- result = DpkgIndexer(d, d.getVar('DEPLOY_DIR_DEB', True)).write_index()
+ for pkg_class in classes:
+ if not pkg_class in indexer_map:
+ continue
+
+ if os.path.exists(indexer_map[pkg_class][1]):
+ result = indexer_map[pkg_class][0](d, indexer_map[pkg_class][1]).write_index()
- if result is not None:
- bb.fatal(result)
+ if result is not None:
+ bb.fatal(result)
if __name__ == "__main__":
"""