[jhbuild] support for lzma compressed tarballs



commit 65bc9a386018a3ed0a54d66c70f164399363181e
Author: Frederic Peters <fpeters 0d be>
Date:   Fri Apr 24 18:07:54 2009 +0200

    support for lzma compressed tarballs
---
 jhbuild/utils/unpack.py           |    3 +++
 jhbuild/versioncontrol/tarball.py |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/jhbuild/utils/unpack.py b/jhbuild/utils/unpack.py
index 8316073..0f3492c 100644
--- a/jhbuild/utils/unpack.py
+++ b/jhbuild/utils/unpack.py
@@ -86,6 +86,9 @@ def unpack_zip_file(localfile, target_directory):
 
 def unpack_archive(buildscript, localfile, target_directory):
     ext = os.path.splitext(localfile)[-1]
+    if ext == '.lzma' and has_command('lzcat') and has_command('tar'):
+        buildscript.execute('lzcat -d "%s" | tar xf -' % localfile,
+                cwd = target_directory)
     if ext == '.bz2' and has_command('bunzip2') and has_command('tar'):
         buildscript.execute('bunzip2 -dc "%s" | tar xf -' % localfile,
                 cwd = target_directory)
diff --git a/jhbuild/versioncontrol/tarball.py b/jhbuild/versioncontrol/tarball.py
index 4ee871f..9244bd9 100644
--- a/jhbuild/versioncontrol/tarball.py
+++ b/jhbuild/versioncontrol/tarball.py
@@ -132,6 +132,8 @@ class TarballBranch(Branch):
             localdir = localdir[:-7]
         elif localdir.endswith('.tar.bz2'):
             localdir = localdir[:-8]
+        elif localdir.endswith('.tar.lzma'):
+            localdir = localdir[:-9]
         elif localdir.endswith('.tgz'):
             localdir = localdir[:-4]
         elif localdir.endswith('.zip'):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]