diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2017-03-02 16:24:22 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-03 11:26:06 +0000 |
commit | 363a0f54dc7d9930537f0df25173fa31ca1f98ac (patch) | |
tree | 7722c9a97b92879aeda1ef1af064bd835e3d2ced /lib/bb | |
parent | 62dc3c3b40a95f9df31f5c917574c3822fb8bb64 (diff) | |
download | bitbake-363a0f54dc7d9930537f0df25173fa31ca1f98ac.tar.gz |
fetch2: pass --no-same-owner when extracting tar files compressed with 7-Zip
Treat tar files compressed with 7-Zip in the same way as tar files
compressed with other compression formats.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 327da87e7..464e66b98 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1404,6 +1404,10 @@ class FetchMethod(object): cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file elif file.endswith('.lz'): cmd = 'lzip -dc %s > %s' % (file, efile) + elif file.endswith('.tar.7z'): + cmd = '7z x -so %s | tar x --no-same-owner -f -' % file + elif file.endswith('.7z'): + cmd = '7za x -y %s 1>/dev/null' % file elif file.endswith('.zip') or file.endswith('.jar'): try: dos = bb.utils.to_boolean(urldata.parm.get('dos'), False) @@ -1435,10 +1439,6 @@ class FetchMethod(object): else: raise UnpackError("Unable to unpack deb/ipk package - could not list contents", urldata.url) cmd = 'ar x %s %s && tar --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile) - 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 'subdir' param exists, create a dir and use it as destination for unpack cmd if 'subdir' in urldata.parm: |