summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2017-01-13 14:35:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:45:42 +0000
commit3e1d8e5c7ac3238eda85ee95dfef044bef2a6411 (patch)
tree030c9ccc974f45b03e20c5098a1eff670c1dc08f
parent331140e892f84b70bced44a0b5d14f32ec95042e (diff)
downloadopenembedded-core-contrib-3e1d8e5c7ac3238eda85ee95dfef044bef2a6411.tar.gz
openembedded-core-contrib-3e1d8e5c7ac3238eda85ee95dfef044bef2a6411.tar.bz2
openembedded-core-contrib-3e1d8e5c7ac3238eda85ee95dfef044bef2a6411.zip
lib/oe/package_manager.py: Fix extract for ipk and deb
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>
-rw-r--r--meta/lib/oe/package_manager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a8644cc1c0..a02bff4caf 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -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)