Example #1
0
def package(pkg_name, update=False):
    """
    Require a opkg package to be installed.

    Example::

        from fabtools import require

        # Require a package
        require.opkg.package('foo')

    """
    if not is_installed(pkg_name):
        install(pkg_name, update=update)
Example #2
0
def package(pkg_name, update=False):
    """
    Require a opkg package to be installed.

    Example::

        from fabtools import require

        # Require a package
        require.opkg.package('foo')

    """
    if not is_installed(pkg_name):
        install(pkg_name, update=update)
Example #3
0
def packages(pkg_list, update=False):
    """
    Require several opkg packages to be installed.

    Example::

        from fabtools import require

        require.opkg.packages([
            'foo',
            'bar',
            'baz',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
    if pkg_list:
        install(pkg_list, update)
Example #4
0
def packages(pkg_list, update=False):
    """
    Require several opkg packages to be installed.

    Example::

        from fabtools import require

        require.opkg.packages([
            'foo',
            'bar',
            'baz',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
    if pkg_list:
        install(pkg_list, update)