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

Context Navigation

  • Back to Ticket #696

Ticket #696: hpkgbuild_gzip.patch

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

Identical patch for hpkgbuild to support the download and extraction of gzipped files from the SRC_URI field in a .bep file

  • (a) hpkgbuild vs. (b) hpkgbuild_gzip

    a b  
    66# copyright 2009 Alexander Deynichenko 
    77# copyright 2009 HaikuBot (aka RISC) 
    88# copyright 2010-2011 Jack Laxson (Jrabbit) 
     9# copyright 2013 Nicholas L. Otley 
    910 
    1011info = {} 
    1112info['version'] = 'r' + '$Rev: 1358 $'[6:-2] 
    … …  
    873874                    Popen(['xz', '-d', '-k', archiveFullPath]) 
    874875                else: 
    875876                    sys.exit() 
     877                     
     878        elif archiveFullPath.split('/')[-1].split('.')[-1] == 'gz': 
     879            gz = 0 
     880            try: 
     881                gz = Popen(['gzip', '-d', '-f', archiveFullPath]) 
     882            except (OSError, CalledProcessError), e: 
     883                # run the installoptionalsoftware prompt 
     884                if self.prompt_installer('gz'): 
     885                    gz = Popen(['gzip', '-d', '-f', archiveFullPath]) 
     886                else: 
     887                    sys.exit() 
     888            gz.wait() 
     889             
    876890            tar = archiveFullPath[:-3] 
    877891            if tarfile.is_tarfile(tar): 
    878892                tf = tarfile.open(tar, 'r') 
    … …  
    11211135            'hg': 'mercurial', 
    11221136            'cvs': 'cvs', 
    11231137            'bzr': 'bazaar', 
     1138            'gz': 'gzip' 
    11241139            } 
    11251140        if self.options.yes: 
    11261141            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/