diff --git a/pym/cl_distr.py b/pym/cl_distr.py index 32e9440..30d7370 100644 --- a/pym/cl_distr.py +++ b/pym/cl_distr.py @@ -921,9 +921,11 @@ class ArchiveDistributive(Distributive): elif "7-zip archive data" in mes: return "7z" elif file and file.endswith(".tar.lzma"): - return "7z" - else: - return None + if path.exists('/usr/bin/7za'): + return "7z" + else: + return "lzma" + return None def _unpackArchive(self,archfile,directory): """Unpack archive""" @@ -939,6 +941,9 @@ class ArchiveDistributive(Distributive): if archiveType == "7z": res,mes = self.runOsCommand("7za x -so %s | tar xf - -C %s/"% (archfile,directory)) + elif archiveType == "lzma": + res,mes = self.runOsCommand("lzma -dc %s | tar xf - -C %s/"% + (archfile,directory)) elif archiveType == "bzip2": res,mes = self.runOsCommand("tar xjf %s -C %s/"% (archfile,directory))