bitbake: fetch2: add .lz compression support

See http://www.nongnu.org/lzip/lzip.html for details on the compression
format.

(Bitbake rev: 9027b1273b5405c7269b013604ab417771b5eafe)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Koen Kooi 2014-10-26 16:09:47 +01:00 committed by Richard Purdie
parent dacc4ce59e
commit f5b9b389c0
1 changed files with 5 additions and 1 deletions

View File

@ -1198,7 +1198,7 @@ class FetchMethod(object):
(file, urldata.parm.get('unpack')))
dots = file.split(".")
if dots[-1] in ['gz', 'bz2', 'Z', 'xz']:
if dots[-1] in ['gz', 'bz2', 'Z', 'xz', 'lz']:
efile = os.path.join(rootdir, os.path.basename('.'.join(dots[0:-1])))
else:
efile = file
@ -1219,6 +1219,10 @@ class FetchMethod(object):
cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
elif file.endswith('.xz'):
cmd = 'xz -dc %s > %s' % (file, efile)
elif file.endswith('.tar.lz'):
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('.zip') or file.endswith('.jar'):
try:
dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)