Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] package_manager.py: create index files for all backends in PACKAGE_CLASSES
@ 2014-02-25 12:36 Laurentiu Palcu
  2014-02-25 12:36 ` [PATCH 1/1] " Laurentiu Palcu
  0 siblings, 1 reply; 2+ messages in thread
From: Laurentiu Palcu @ 2014-02-25 12:36 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 72576e2d04dc8b43ae0d7f31cddd74318f52103e:

  bitbake: hob: replace the use of hob-toolchain with populate_sdk task (2014-02-25 08:06:11 +0000)

are available in the git repository at:

  git://mirror.rb.intel.com/git.yoctoproject.org/poky-contrib lpalcu/b5827_package_index_fix

for you to fetch changes up to ae8627a6eb1d76b1535a222d9011093bdee79cdb:

  package_manager.py: create index files for all backends in PACKAGE_CLASSES (2014-02-25 14:25:35 +0200)

----------------------------------------------------------------
Laurentiu Palcu (1):
      package_manager.py: create index files for all backends in PACKAGE_CLASSES

 meta/lib/oe/package_manager.py |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

Laurentiu Palcu (1):
  package_manager.py: create index files for all backends in
    PACKAGE_CLASSES

 meta/lib/oe/package_manager.py |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] package_manager.py: create index files for all backends in PACKAGE_CLASSES
  2014-02-25 12:36 [PATCH 0/1] package_manager.py: create index files for all backends in PACKAGE_CLASSES Laurentiu Palcu
@ 2014-02-25 12:36 ` Laurentiu Palcu
  0 siblings, 0 replies; 2+ messages in thread
From: Laurentiu Palcu @ 2014-02-25 12:36 UTC (permalink / raw)
  To: openembedded-core

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]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/lib/oe/package_manager.py |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index d29adac..ff4f1de 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__":
     """
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-25 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-25 12:36 [PATCH 0/1] package_manager.py: create index files for all backends in PACKAGE_CLASSES Laurentiu Palcu
2014-02-25 12:36 ` [PATCH 1/1] " Laurentiu Palcu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox