summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2017-03-02 16:24:22 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 23:18:46 +0000
commitc225f0fdb52ac1a336f0d0233773a0282d8953ae (patch)
tree084fb6f08b722a9cfe8a4de6402aebc68f111a1c /bitbake/lib
parent0788007ccf66e290a7893248aa507e48366ebdfa (diff)
downloadpoky-c225f0fdb52ac1a336f0d0233773a0282d8953ae.tar.gz
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 327da87e72..464e66b98a 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1404,6 +1404,10 @@ class FetchMethod(object):
1404 cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file 1404 cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
1405 elif file.endswith('.lz'): 1405 elif file.endswith('.lz'):
1406 cmd = 'lzip -dc %s > %s' % (file, efile) 1406 cmd = 'lzip -dc %s > %s' % (file, efile)
1407 elif file.endswith('.tar.7z'):
1408 cmd = '7z x -so %s | tar x --no-same-owner -f -' % file
1409 elif file.endswith('.7z'):
1410 cmd = '7za x -y %s 1>/dev/null' % file
1407 elif file.endswith('.zip') or file.endswith('.jar'): 1411 elif file.endswith('.zip') or file.endswith('.jar'):
1408 try: 1412 try:
1409 dos = bb.utils.to_boolean(urldata.parm.get('dos'), False) 1413 dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)
@@ -1435,10 +1439,6 @@ class FetchMethod(object):
1435 else: 1439 else:
1436 raise UnpackError("Unable to unpack deb/ipk package - could not list contents", urldata.url) 1440 raise UnpackError("Unable to unpack deb/ipk package - could not list contents", urldata.url)
1437 cmd = 'ar x %s %s && tar --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile) 1441 cmd = 'ar x %s %s && tar --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile)
1438 elif file.endswith('.tar.7z'):
1439 cmd = '7z x -so %s | tar xf - ' % file
1440 elif file.endswith('.7z'):
1441 cmd = '7za x -y %s 1>/dev/null' % file
1442 1442
1443 # If 'subdir' param exists, create a dir and use it as destination for unpack cmd 1443 # If 'subdir' param exists, create a dir and use it as destination for unpack cmd
1444 if 'subdir' in urldata.parm: 1444 if 'subdir' in urldata.parm: