summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-05-08 01:50:48 +0200
committerHelmut Grohne <helmut@subdivi.de>2014-05-11 15:29:17 +0200
commite2d7f5e1e1ef06c28ca432bc070595b87d78ac85 (patch)
tree44399a269ee23bf6d7b4bcc8b0a569223327cf3f
parentddaa08f7a63a1fedf4c1f2804873199dd5182142 (diff)
downloaddebian-dedup-e2d7f5e1e1ef06c28ca432bc070595b87d78ac85.tar.gz
importpkg: add support for data.tar.lzma
Creating packages with lzma compression has been deprecated since dpkg 1.16.4, but there might be some of those in the wild and supporting them is strightforward when xz is already supported. Signed-off-by: Guillem Jover <guillem@debian.org>
-rwxr-xr-ximportpkg.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/importpkg.py b/importpkg.py
index 7482c4f..247965f 100755
--- a/importpkg.py
+++ b/importpkg.py
@@ -69,6 +69,10 @@ def process_package(filelike, hash_functions):
elif name == "data.tar.bz2":
new_state = "data"
tf = tarfile.open(fileobj=af, mode="r|bz2")
+ elif name == "data.tar.lzma":
+ new_state = "data"
+ zf = DecompressedStream(af, lzma.LZMADecompressor())
+ tf = tarfile.open(fileobj=zf, mode="r|")
elif name == "data.tar.xz":
new_state = "data"
zf = DecompressedStream(af, lzma.LZMADecompressor())