diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index be01bdbb34..f612318cc5 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -1392,7 +1392,18 @@ class FetchMethod(object): | |||
| 1392 | else: | 1392 | else: |
| 1393 | cmd = 'rpm2cpio.sh %s | cpio -id' % (file) | 1393 | cmd = 'rpm2cpio.sh %s | cpio -id' % (file) |
| 1394 | elif file.endswith('.deb') or file.endswith('.ipk'): | 1394 | elif file.endswith('.deb') or file.endswith('.ipk'): |
| 1395 | cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file | 1395 | output = subprocess.check_output('ar -t %s' % file, preexec_fn=subprocess_setup, shell=True) |
| 1396 | datafile = None | ||
| 1397 | if output: | ||
| 1398 | for line in output.splitlines(): | ||
| 1399 | if line.startswith('data.tar.'): | ||
| 1400 | datafile = line | ||
| 1401 | break | ||
| 1402 | else: | ||
| 1403 | raise UnpackError("Unable to unpack deb/ipk package - does not contain data.tar.* file", urldata.url) | ||
| 1404 | else: | ||
| 1405 | raise UnpackError("Unable to unpack deb/ipk package - could not list contents", urldata.url) | ||
| 1406 | cmd = 'ar x %s %s && tar --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile) | ||
| 1396 | elif file.endswith('.tar.7z'): | 1407 | elif file.endswith('.tar.7z'): |
| 1397 | cmd = '7z x -so %s | tar xf - ' % file | 1408 | cmd = '7z x -so %s | tar xf - ' % file |
| 1398 | elif file.endswith('.7z'): | 1409 | elif file.endswith('.7z'): |
