Skip to contentSkip to conversation

lib/oe/package_manager.py: Fix extract for ipk and deb

PATCH New [email protected] 1 participant 1 message Jan 13, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 lib/oe/package_manager.py: Fix extract for ipk and deb

From: Mariano Lopez <[email protected]>

With the move to use lists instead of strings in subprocess calls, package extraction was broken for ipk and deb. This fixes this issue.

---
 meta/lib/oe/package_manager.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oe/package_manager.py +5 -1
index a8644cc..a02bff4 100644
@@ -1545,11 +1545,15 @@ class OpkgDpkgPM(PackageManager):
         tmp_dir = tempfile.mkdtemp()
         current_dir = os.getcwd()
         os.chdir(tmp_dir)
+        if self.d.getVar('IMAGE_PKGTYPE') == 'deb':
+            data_tar = 'data.tar.xz'
+        else:
+            data_tar = 'data.tar.gz'
 
         try:
             cmd = [ar_cmd, 'x', pkg_path]
             output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-            cmd = [tar_cmd, 'xf', 'data.tar.*']
+            cmd = [tar_cmd, 'xf', data_tar]
             output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
         except subprocess.CalledProcessError as e:
             bb.utils.remove(tmp_dir, recurse=True)
Signature · 1 line
2.6.6