From 763506d49bbc781d0dbb0a7af425d7e77c948248 Mon Sep 17 00:00:00 2001 From: Juro Bystricky Date: Mon, 4 Jan 2016 10:51:43 -0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/fetch2/__init__.py') 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): cmd = 'rpm2cpio.sh %s | cpio -id' % (file) elif file.endswith('.deb') or file.endswith('.ipk'): cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file + elif file.endswith('.tar.7z'): + cmd = '7z x -so %s | tar xf - ' % file + elif file.endswith('.7z'): + cmd = '7za x -y %s 1>/dev/null' % file if not unpack or not cmd: # If file == dest, then avoid any copies, as we already put the file into dest! -- cgit v1.2.3-54-g00ecf