def install(packages, update=False, options=None):
    """
    Install one or more Portage packages.

    If *update* is ``True``, the package definitions will be updated
    first, using :py:func:`~fabtools.portage.update_index`.

    Extra *options* may be passed to ``emerge`` if necessary.

    Example::

        import fabtools

        # Update index, then install a single package
        fabtools.portage.install('mongodb', update=True)

        # Install multiple packages
        fabtools.arch.install([
            'dev-db/mongodb',
            'pymongo',
        ])

    """
    manager = MANAGER

    if update:
        update_index()

    options = options or []
    options = " ".join(options)

    if not isinstance(packages, basestring):
        packages = " ".join(packages)

    cmd = '%(manager)s %(options)s %(packages)s' + locals()
    run_as_root(cmd, pty=False)
dataset/ETHPy150Open ronnix/fabtools/fabtools/portage.py/install/operator `%` -> `+`