def apt_install(packages, options=None, fatal=False):
    """Install one or more packages."""
    if options is None:
        options = ['--option=Dpkg::Options::=--force-confold']

    cmd = ['apt-get', '--assume-yes']
    cmd.extend(options)
    cmd.append('install')
    if isinstance(packages, six.string_types):
        cmd.append(packages)
    else:
        cmd.extend(packages)
    log("Installing {} with options: {}".format(packages,
                                                options))
    _run_apt_command(cmd, fatal)
def apt_install ( packages , options = None , fatal = False ) : if options is None : options = [ '--option=Dpkg::Options::=--force-confold' ] cmd = [ 'apt-get' , '--assume-yes' ] cmd . extend ( options ) cmd . append ( 'install' ) if isinstance ( packages , six . string_types ) : cmd . append ( packages ) else : cmd . extend ( packages ) log ( "Installing {} with options: {}" . format ( packages , options ) ) _run_apt_command ( cmd , fatal )
Install one or more packages.