[2/2] lib/oe/package_manager: avoid traceback with no packages

Submitted by Paul Eggleton on April 13, 2015, 3:44 p.m. | Patch ID: 91785

Details

Message ID 4a12d179a4c549275a4343e5c3df881a5adffab0.1428939870.git.paul.eggleton@linux.intel.com
State New
Headers show

Commit Message

Paul Eggleton April 13, 2015, 3:44 p.m.
If you were using deb packaging, had buildhistory enabled and produced
an SDK that contained no packages in one of the sysroots (such as with
uninative-tarball) then the do_populate_sdk was failing with a python
traceback because there were no fields to split in the output line.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oe/package_manager.py | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index ed0c9a7..e46a7e6 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -446,6 +446,8 @@  class DpkgPkgsList(PkgsList):
         if format == "file":
             tmp_output = ""
             for line in tuple(output.split('\n')):
+                if not line.strip():
+                    continue
                 pkg, pkg_file, pkg_arch = line.split()
                 full_path = os.path.join(self.rootfs_dir, pkg_arch, pkg_file)
                 if os.path.exists(full_path):