

def install(packages, update=False, options=None, version=None):
    "\n    Install one or more packages.\n\n    If *update* is ``True``, the package definitions will be updated\n    first, using :py:func:`~fabtools.deb.update_index`.\n\n    Extra *options* may be passed to ``apt-get`` if necessary.\n\n    Example::\n\n        import fabtools\n\n        # Update index, then install a single package\n        fabtools.deb.install('build-essential', update=True)\n\n        # Install multiple packages\n        fabtools.deb.install([\n            'python-dev',\n            'libxml2-dev',\n        ])\n\n        # Install a specific version\n        fabtools.deb.install('emacs', version='23.3+1-1ubuntu9')\n\n    "
    manager = MANAGER
    if update:
        update_index()
    if (options is None):
        options = []
    if (version is None):
        version = ''
    if (version and (not isinstance(packages, list))):
        version = ('=' + options)
    if (not isinstance(packages, basestring)):
        packages = ' '.join(packages)
    options.append('--quiet')
    options.append('--assume-yes')
    options = ' '.join(options)
    cmd = ('%(manager)s install %(options)s %(packages)s%(version)s' % locals())
    run_as_root(cmd, pty=False)

dataset/ETHPy150Open ronnix/fabtools/fabtools/deb.py install/VarMisuse@89/327 `version`->`options`