bitbake: 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. (Bitbake rev: 363a0f54dc7d9930537f0df25173fa31ca1f98ac) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0788007ccf
commit
c225f0fdb5
|
@ -1404,6 +1404,10 @@ class FetchMethod(object):
|
||||||
cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
|
cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
|
||||||
elif file.endswith('.lz'):
|
elif file.endswith('.lz'):
|
||||||
cmd = 'lzip -dc %s > %s' % (file, efile)
|
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'):
|
elif file.endswith('.zip') or file.endswith('.jar'):
|
||||||
try:
|
try:
|
||||||
dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)
|
dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)
|
||||||
|
@ -1435,10 +1439,6 @@ class FetchMethod(object):
|
||||||
else:
|
else:
|
||||||
raise UnpackError("Unable to unpack deb/ipk package - could not list contents", urldata.url)
|
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)
|
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' param exists, create a dir and use it as destination for unpack cmd
|
||||||
if 'subdir' in urldata.parm:
|
if 'subdir' in urldata.parm:
|
||||||
|
|
Loading…
Reference in New Issue