Beispiel #1
0
def install(package, upgrade=False):
    """
    Helper method to install a deb package.

    If the package is already installed and the parameter 'upgrade' is True,
    then it will be upgraded if possible.

    """
    if not is_installed(package):
        deb_install(package)

    if upgrade:
        cmd = 'apt-get install --only-upgrade {}'.format(package)
        sudo(cmd)
Beispiel #2
0
def install(package):
    """ Helper method to install a deb package if is not already installed. """
    if not is_installed(package):
        deb_install(package)