rpm: Added .xz to the list of supported compression types for original tarballs
authorEd Bartosh <eduard.bartosh@intel.com>
Thu, 3 May 2012 14:17:02 +0000 (17:17 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Wed, 9 May 2012 08:00:44 +0000 (11:00 +0300)
Change-Id: I36ff686e71a6033c9db3b35514429987bf0f68a5

gbp/rpm/__init__.py

index f97ba4970b5a55e8874d0261c8ba3b79ff3855bf..247369462b6d7a520b5643cd1a3ac3ca3de7538c 100644 (file)
@@ -148,7 +148,7 @@ class SrcRpmFile(object):
         Try to guess the name of the primary upstream/source tarball
         returns a tuple with tarball filename and compression suffix
         """
-        tarball_re = re.compile(r'(?P<name>%s)?.*tar\.?(?P<comp>(bz2|gz|\b))$' % self.rpmhdr[rpm.RPMTAG_NAME])
+        tarball_re = re.compile(r'(?P<name>%s)?.*tar\.?(?P<comp>(bz2|gz|xz|\b))$' % self.rpmhdr[rpm.RPMTAG_NAME])
         tarball = ""
         comp = ""
 
@@ -416,7 +416,7 @@ class SpecFile(object):
         Try to guess the name of the primary upstream/source tarball
         returns a tuple with tarball filename and compression suffix
         """
-        tarball_re = re.compile(r'(?P<base>(?P<name>%s)?.*)\.tar\.?(?P<comp>(bz2|gz|\b))$' %
+        tarball_re = re.compile(r'(?P<base>(?P<name>%s)?.*)\.tar\.?(?P<comp>(bz2|gz|xz|\b))$' %
                                 self.specinfo.packages[0].header[rpm.RPMTAG_NAME])
         tarball = ""
         base = ""