]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/oe/package_manager.py: Fix extract for ipk and deb
authorMariano Lopez <mariano.lopez@linux.intel.com>
Fri, 13 Jan 2017 14:35:41 +0000 (14:35 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Jan 2017 22:45:42 +0000 (22:45 +0000)
With the move to use lists instead of strings in subprocess
calls, package extraction was broken for ipk and deb. This
fixes this issue.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/package_manager.py

index a8644cc1c0e69d1044f071cbf3a4d39c9cdd5ae4..a02bff4cafd1625f0779c48509403b5f0dae2035 100644 (file)
@@ -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)