Exemplo n.º 1
0
def nopackage(pkg_name):
    """
    Require a opkg package to be uninstalled.

    Example::

        from fabtools import require

        require.opkg.nopackage('apache2')
    """
    if is_installed(pkg_name):
        uninstall(pkg_name)
Exemplo n.º 2
0
def nopackage(pkg_name, force_depends=False, force_removal_of_dependent_packages=False):
    """
    Require a opkg package to be uninstalled.

    Example::

        from fabtools import require

        require.opkg.nopackage('apache2')
    """
    if is_installed(pkg_name):
        uninstall(pkg_name, force_depends=force_depends, force_removal_of_dependent_packages=force_removal_of_dependent_packages)
Exemplo n.º 3
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)
Exemplo n.º 4
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)
Exemplo n.º 5
0
def nopackages(pkg_list, force_depends=False, force_removal_of_dependent_packages=False):
    """
    Require several opkg packages to be uninstalled.

    Example::

        from fabtools import require

        require.opkg.nopackages([
            'perl',
            'php5',
            'ruby',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if is_installed(pkg)]
    if pkg_list:
        uninstall(pkg_list, force_depends=force_depends, force_removal_of_dependent_packages=force_removal_of_dependent_packages)
Exemplo n.º 6
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)
Exemplo n.º 7
0
def nopackage(pkg_name,
              force_depends=False,
              force_removal_of_dependent_packages=False):
    """
    Require a opkg package to be uninstalled.

    Example::

        from fabtools import require

        require.opkg.nopackage('apache2')
    """
    if is_installed(pkg_name):
        uninstall(pkg_name,
                  force_depends=force_depends,
                  force_removal_of_dependent_packages=
                  force_removal_of_dependent_packages)
Exemplo n.º 8
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)
Exemplo n.º 9
0
def nopackages(pkg_list):
    """
    Require several opkg packages to be uninstalled.

    Example::

        from fabtools import require

        require.opkg.nopackages([
            'perl',
            'php5',
            'ruby',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if is_installed(pkg)]
    if pkg_list:
        uninstall(pkg_list)
Exemplo n.º 10
0
def nopackages(pkg_list,
               force_depends=False,
               force_removal_of_dependent_packages=False):
    """
    Require several opkg packages to be uninstalled.

    Example::

        from fabtools import require

        require.opkg.nopackages([
            'perl',
            'php5',
            'ruby',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if is_installed(pkg)]
    if pkg_list:
        uninstall(pkg_list,
                  force_depends=force_depends,
                  force_removal_of_dependent_packages=
                  force_removal_of_dependent_packages)