From e2d7f5e1e1ef06c28ca432bc070595b87d78ac85 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 8 May 2014 01:50:48 +0200 Subject: 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 --- importpkg.py | 4 ++++ 1 file changed, 4 insertions(+) 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()) -- cgit v1.2.3