From bfb324454860984738075324983231b6a1e9351c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Sun, 20 Jun 2010 21:02:29 +0000 Subject: [PATCH] package: Use common code to get archive name and format --- pisi/package.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pisi/package.py b/pisi/package.py index 21e15b17..f9cedd11 100644 --- a/pisi/package.py +++ b/pisi/package.py @@ -157,19 +157,10 @@ class Package: ctx.build_leftover = None def get_install_archive(self): - if self.format == "1.2": - archive_format = "tarxz" - archive_suffix = ctx.const.xz_suffix - elif self.format == "1.1": - archive_format = "tarlzma" - archive_suffix = ctx.const.lzma_suffix - else: - # "1.0" format does not have an archive - return + archive_name, archive_format = \ + self.archive_name_and_format(self.format) - archive_name = ctx.const.install_tar + archive_suffix - - if not self.impl.has_file(archive_name): + if archive_name is None or not self.impl.has_file(archive_name): return archive_file = self.impl.open(archive_name)