Example #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)
Example #2
0
def install(path):
    """pacman -U path"""
    command = 'sudo -S pacman -U --noconfirm {}'.format(path)
    return execute(command)
Example #3
0
def system_upgrade():
    """pacman -Syu"""
    execute('sudo -S pacman -Syu --noconfirm', discard_output=True)
Example #4
0
def refresh_force():
    """pacman -Syy"""
    execute('sudo -S pacman -Syy', discard_output=True)
Example #5
0
def exist(package):
    """check 'pacman -Si package' return code"""
    result = execute('pacman -Ss "^{}$"'.format(package))
    return not bool(result.returncode)