示例#1
0
def package(pkg_name, repos=None, yes=None, options=None):
    """
    Require a rpm package to be installed.

    Example::

        from fabtools import require

        require.rpm.package('emacs')
    """
    if not is_installed(pkg_name):
        install(pkg_name, repos, yes, options)
示例#2
0
文件: rpm.py 项目: 26lights/fabtools
def package(pkg_name, repos=None, yes=None, options=None):
    """
    Require an RPM package to be installed.

    Example::

        from fabtools import require

        require.rpm.package('emacs')
    """
    if not is_installed(pkg_name):
        install(pkg_name, repos, yes, options)
示例#3
0
def packages(pkg_list, repos=None, yes=None, options=None):
    """
    Require several rpm packages to be installed.

    Example::

        from fabtools import require

        require.rpm.packages([
            'nano',
            'unzip',
            'vim',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
    if pkg_list:
        install(pkg_list, repos, yes, options)
示例#4
0
文件: rpm.py 项目: 26lights/fabtools
def packages(pkg_list, repos=None, yes=None, options=None):
    """
    Require several RPM packages to be installed.

    Example::

        from fabtools import require

        require.rpm.packages([
            'nano',
            'unzip',
            'vim',
        ])
    """
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
    if pkg_list:
        install(pkg_list, repos, yes, options)