| 629 | | check_call(checkoutCommand, shell=True, cwd=self.workDir) |
| 630 | | |
| | 629 | try: |
| | 630 | check_call(checkoutCommand, shell=True, cwd=self.workDir) |
| | 631 | except (OSError, CalledProcessError), e: |
| | 632 | if self.prompt_installer(checkoutCommand.split()[0]): |
| | 633 | check_call(checkoutCommand, shell=True, cwd=self.workDir) |
| | 634 | else: |
| | 635 | sys.exit() |
| | 636 | |
| 688 | | Popen(['xz', '-d', '-k', archiveFullPath]) |
| | 694 | try: |
| | 695 | Popen(['xz', '-d', '-k', archiveFullPath]) |
| | 696 | except (OSError, CalledProcessError), e: |
| | 697 | #run the installoptionalsoftware prompt |
| | 698 | if self.prompt_installer('xz'): |
| | 699 | Popen(['xz', '-d', '-k', archiveFullPath]) |
| | 700 | else: |
| | 701 | sys.exit() |
| | 896 | def prompt_installer(self, name): |
| | 897 | response = raw_input("Do you want to install %s? [Y/n]" % name) |
| | 898 | apps = {'xz': 'XZ-Utils', 'git': 'Git', 'hg': 'mercurial', 'cvs': 'cvs', 'bzr' : 'bazaar'} #map command to package |
| | 899 | if response in ["y", "Y", "\n", "yes", ''] or self.options.yes: |
| | 900 | check_call('installoptionalpackage' + " " + str(apps[name]), shell=True) |
| | 901 | return True |
| | 902 | else: |
| | 903 | print "In order to install this package you need to run installoptionalsoftware %s later or let Haikuports install it for you." % apps[name] |
| | 904 | return False |