summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2016-01-04 10:51:43 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-06 15:27:34 +0000
commit763506d49bbc781d0dbb0a7af425d7e77c948248 (patch)
tree91587ffb80728784bc7b24c490f03b0b70b1353a /bitbake/lib/bb/fetch2
parentf5bfc1cc26ddfb38121cc7d79869a86219dcf5c4 (diff)
downloadpoky-763506d49bbc781d0dbb0a7af425d7e77c948248.tar.gz
bitbake: fetch2/__init__.py: Add support for 7-Zip
7-Zip is a file archiver claiming the highest compression ratio. This patch allows using 7-Zip commpressed files in bitbake recipes. Two common formats are supported: SRC_URI = "file://abc.tar.7z" SRC_URI = "file://abc.7z" (Bitbake rev: 7120f5bfaae54e91bc95da5667831424724ce613) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 68ebf8b8d2..0f9c643695 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1407,6 +1407,10 @@ class FetchMethod(object):
1407 cmd = 'rpm2cpio.sh %s | cpio -id' % (file) 1407 cmd = 'rpm2cpio.sh %s | cpio -id' % (file)
1408 elif file.endswith('.deb') or file.endswith('.ipk'): 1408 elif file.endswith('.deb') or file.endswith('.ipk'):
1409 cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file 1409 cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file
1410 elif file.endswith('.tar.7z'):
1411 cmd = '7z x -so %s | tar xf - ' % file
1412 elif file.endswith('.7z'):
1413 cmd = '7za x -y %s 1>/dev/null' % file
1410 1414
1411 if not unpack or not cmd: 1415 if not unpack or not cmd:
1412 # If file == dest, then avoid any copies, as we already put the file into dest! 1416 # If file == dest, then avoid any copies, as we already put the file into dest!