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

Context Navigation

  • Back to Ticket #696

Ticket #696: haikuporter_gzip.patch

File haikuporter_gzip.patch, 1.3 KB (added by nicholas, 2 years ago)

Patch for Haikuporter to support the download and extraction of gzipped files from the SRC_URI field in a .bep file

  • haikuporter

    old new  
    88# copyright 2010-2011 Jack Laxson (Jrabbit) 
    99# copyright 2012 TriEdge AI 
    1010# copyright 2012 Theodore Kokkoris 
     11# copyright 2013 Nicholas L. Otley 
    1112 
    1213info = {} 
    1314info['version'] = 'r' + '$Rev: 2224 $'[6:-2] 
    … …  
    737738                else: 
    738739                    sys.exit() 
    739740            xz.wait() 
     741 
     742 
     743        elif archiveFullPath.split('/')[-1].split('.')[-1] == 'gz': 
     744            gz = 0 
     745            try: 
     746                gz = Popen(['gzip', '-d', '-f', archiveFullPath]) 
     747            except (OSError, CalledProcessError), e: 
     748                # run the installoptionalsoftware prompt 
     749                if self.prompt_installer('gz'): 
     750                    gz = Popen(['gzip', '-d', '-f', archiveFullPath]) 
     751                else: 
     752                    sys.exit() 
     753            gz.wait() 
     754 
    740755            tar = archiveFullPath[:-3] 
    741756            if tarfile.is_tarfile(tar): 
    742757                tf = tarfile.open(tar, 'r') 
    … …  
    9881003            'hg': 'mercurial', 
    9891004            'cvs': 'cvs', 
    9901005            'bzr': 'bazaar', 
    991             'cmake': 'cmake' 
     1006            'cmake': 'cmake', 
     1007            'gz': 'gzip' 
    9921008            } 
    9931009        if self.options.yes: 
    9941010            check_call('installoptionalpackage' + ' ' 

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/