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

Context Navigation

  • Back to Ticket #248

Ticket #248: tgz_bz2_support.diff

File tgz_bz2_support.diff, 757 bytes (added by haikubot, 6 years ago)
  • haikuporter

     
    489493                os.chdir(self.workDir) 
    490494                print "Unpacking " + self.src_local 
    491495                archiveFullPath = self.downloadDir + "/" + self.src_local 
    492                 if tarfile.is_tarfile(archiveFullPath): # TODO: doesn't recognize .tar.bz2 
    493                         # TODO: differentiate between .tar and .tar.gz 
    494                         os.system("tar xzf " + self.downloadDir + "/" + self.src_local) 
     496                if tarfile.is_tarfile(archiveFullPath): 
     497                        tar = tarfile.open(self.downloadDir + "/" + self.src_local) 
     498                        tar.extractall() 
     499                        tar.close() 
    495500                elif zipfile.is_zipfile(archiveFullPath): 
    496501                        os.system("unzip " + self.downloadDir + "/" + self.src_local) 
    497502                else: 

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/