summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@linaro.org>2013-07-30 12:56:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-31 06:59:59 +0100
commitd45486eb1c41daeaa3947750b89cb83f59712548 (patch)
tree9f79c984ced2dbb9591ecf6a2ed93a4392f4dd14
parent5472bdc2f0119c538d39bfe1531690bccc18ede1 (diff)
downloadpoky-d45486eb1c41daeaa3947750b89cb83f59712548.tar.gz
poky-d45486eb1c41daeaa3947750b89cb83f59712548.tar.bz2
poky-d45486eb1c41daeaa3947750b89cb83f59712548.zip
bitbake: fetch2: fix unpack of .xz files
If a file ends with .xz, it currently gets overwritten during unpack: The decompress command for .xz files is: 'xz -dc %s > %s' % (file, efile) and as efile == file, we end up overwriting file (the source). Fix this by adding .xz to the list of suffixes that that need to be removed from a file name for an extract command, leaving the bare file name. Now, for a given file foo.xz, file == foo.xz and efile == foo, similar to how .gz .bz2 and .Z files are treated. (Bitbake rev: 2cd2d0a48e12ab4358fb967eaf7a56c17993f48d) Signed-off-by: André Draszik <andre.draszik@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 6211cd7f5d..451d104f67 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1157,7 +1157,7 @@ class FetchMethod(object):
(file, urldata.parm.get('unpack')))
dots = file.split(".")
- if dots[-1] in ['gz', 'bz2', 'Z']:
+ if dots[-1] in ['gz', 'bz2', 'Z', 'xz']:
efile = os.path.join(rootdir, os.path.basename('.'.join(dots[0:-1])))
else:
efile = file