HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #408

Ticket #408: xz.patch

File xz.patch, 861 bytes (added by jrabbit, 5 years ago)

THIS ONE

  • haikuporter

     
    2424import hashlib 
    2525import shutil 
    2626import commands 
    27 from subprocess import check_call 
     27from subprocess import check_call, Popen 
    2828from optparse import OptionParser 
    2929 
    3030# -- HaikuPorts options ------------------------------------------------------- 
    … …  
    684684                        zf = zipfile.ZipFile(self.downloadDir + "/" + self.src_local, 'r') 
    685685                        zf.extractall(self.workDir) 
    686686                        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() 
    687694                else: 
    688695                        sys.exit("Error: Unrecognized archive type.") 
    689696 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/