Пример #1
0
def install(package, asdeps=False):
    """pacman -S [--asdeps] package"""
    option = ['--noconfirm', '--needed']
    if asdeps:
        option.append('--asdeps')
    command = 'sudo -S pacman -S {} {}'.format(' '.join(option), ' '.join(package))
    execute(command, discard_output=True)
Пример #2
0
def install(path):
    """pacman -U path"""
    command = 'sudo -S pacman -U --noconfirm {}'.format(path)
    return execute(command)
Пример #3
0
def system_upgrade():
    """pacman -Syu"""
    execute('sudo -S pacman -Syu --noconfirm', discard_output=True)
Пример #4
0
def refresh_force():
    """pacman -Syy"""
    execute('sudo -S pacman -Syy', discard_output=True)
Пример #5
0
def exist(package):
    """check 'pacman -Si package' return code"""
    result = execute('pacman -Ss "^{}$"'.format(package))
    return not bool(result.returncode)