コード例 #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)