Exemple #1
0
def require_supported(binaries, _output):
    for command, mtype, package in binaries:
        kind, path = resolve_command(command, _output)
        if not path:
            if _output:
                _output(kind + ' ' + command + ' seems to be missing!'
                        ' Overlay type "' + mtype + '" not support'
                        'ed. Did you emerge ' + package + '?')
            return False
    return True
Exemple #2
0
def require_supported(binaries, _output):
    for command, mtype, package in binaries:
        kind, path = resolve_command(command, _output)
        if not path:
            if _output:
                _output(kind + ' ' + command + ' seems to be missing!'
                            ' Overlay type "' + mtype + '" not support'
                            'ed. Did you emerge ' + package + '?')
            return False
    return True
Exemple #3
0
    def check_upgrade(self, target):
        '''Code to run "svn upgrade" it only takes longer
        than checking if it does need an upgrade if it is
        actually needed.
        '''
        file_to_run = resolve_command(self.command(), self.output.error)[1]
        args = " ".join([file_to_run, " upgrade", target])
        pipe = Popen(args, shell=True, stdout=PIPE, stderr=PIPE)
        stdout = pipe.stdout.read()
        self.output.debug("SVN: check_upgrade()... running svn upgrade", 4)

        if sys.hexversion >= 0x3000000:
            stdout = stdout.decode('UTF-8')

        upgrade_output = stdout.strip('\n')
        if upgrade_output:
            self.output.debug("  output: %r" % upgrade_output, 4)
        self.output.debug("SVN: check_upgrade()... svn upgrade done", 4)
        pipe.terminate()
        pipe.stdout.close()
        pipe.stderr.close()
        return
Exemple #4
0
    def check_upgrade(self, target):
        '''Code to run "svn upgrade" it only takes longer
        than checking if it does need an upgrade if it is
        actually needed.
        '''
        file_to_run = resolve_command(self.command(), self.output.error)[1]
        args = " ".join([file_to_run, " upgrade", target])
        pipe = Popen(args, shell=True, stdout=PIPE, stderr=PIPE)
        stdout = pipe.stdout.read()
        self.output.debug("SVN: check_upgrade()... running svn upgrade", 4)

        if sys.hexversion >= 0x3000000:
            stdout = stdout.decode('UTF-8')

        upgrade_output = stdout.strip('\n')
        if upgrade_output:
            self.output.debug("  output: %r" % upgrade_output, 4)
        self.output.debug("SVN: check_upgrade()... svn upgrade done", 4)
        pipe.terminate()
        pipe.stdout.close()
        pipe.stderr.close()
        return