Ejemplo n.º 1
0
def install_missing_packages(packages, repository=None):
    """Install the required debian packages if they are missing.

    If repository is not None, add the given apt repository before installing
    the dependencies.
    """
    missing = find_missing_packages(*packages)
    if missing:
        if repository is not None:
            log('Adding the apt repository {}.'.format(repository))
            install_extra_repositories(repository)
        log('Installing deb packages: {}.'.format(', '.join(missing)))
        cmd_log(apt_get_install(*missing))
    else:
        log('No missing deb packages.')
Ejemplo n.º 2
0
def install_missing_packages(packages, repository=None):
    """Install the required debian packages if they are missing.

    If repository is not None, add the given apt repository before installing
    the dependencies.
    """
    missing = find_missing_packages(*packages)
    if missing:
        if repository is not None:
            log('Adding the apt repository {}.'.format(repository))
            install_extra_repositories(repository)
        log('Installing deb packages: {}.'.format(', '.join(missing)))
        cmd_log(apt_get_install(*missing))
    else:
        log('No missing deb packages.')
Ejemplo n.º 3
0
def get_staging_dependencies():
    """Install deb dependencies for the stage (improv) environment."""
    log('Installing stage dependencies.')
    cmd_log(apt_get_install(*DEB_STAGE_DEPENDENCIES))
Ejemplo n.º 4
0
def _get_build_dependencies():
    """Install deb dependencies for building."""
    log('Installing build dependencies.')
    cmd_log(install_extra_repositories(*BUILD_REPOSITORIES))
    cmd_log(apt_get_install(*DEB_BUILD_DEPENDENCIES))
Ejemplo n.º 5
0
def get_staging_dependencies():
    """Install deb dependencies for the stage (improv) environment."""
    log('Installing stage dependencies.')
    cmd_log(apt_get_install(*DEB_STAGE_DEPENDENCIES))
Ejemplo n.º 6
0
def _get_build_dependencies():
    """Install deb dependencies for building."""
    log('Installing build dependencies.')
    cmd_log(install_extra_repositories(*BUILD_REPOSITORIES))
    cmd_log(apt_get_install(*DEB_BUILD_DEPENDENCIES))