]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager: avoid traceback with no packages
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 17 Apr 2015 15:43:08 +0000 (16:43 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 19 Apr 2015 12:34:04 +0000 (13:34 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py

index 0460415699e5ff5d06e759e87af66b507ea0a70b..fffe11d15040cec62a40e17e326775e0f7d9acad 100644 (file)
@@ -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):