Ticket #408: xz.patch
| File xz.patch, 861 bytes (added by jrabbit, 5 years ago) |
|---|
-
haikuporter
24 24 import hashlib 25 25 import shutil 26 26 import commands 27 from subprocess import check_call 27 from subprocess import check_call, Popen 28 28 from optparse import OptionParser 29 29 30 30 # -- HaikuPorts options ------------------------------------------------------- … … 684 684 zf = zipfile.ZipFile(self.downloadDir + "/" + self.src_local, 'r') 685 685 zf.extractall(self.workDir) 686 686 zf.close() 687 elif archiveFullPath.split("/")[-1].split(".")[-1] == "xz": 688 Popen(['xz', '-d', archiveFullPath]) 689 tar = archiveFullPath[:-3] 690 if tarfile.is_tarfile(tar): 691 tf = tarfile.open(tar, 'r') 692 tf.extractall(self.workDir) 693 tf.close() 687 694 else: 688 695 sys.exit("Error: Unrecognized archive type.") 689 696
