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