salt.modules.ebuild

Support for Portage

salt.modules.ebuild.available_version(name)

The available version of the package in the repository

CLI Example:

salt '*' pkg.available_version <package name>
salt.modules.ebuild.install(pkg, refresh=False, **kwargs)

Install the passed package

Return a dict containing the new package names and versions:

{'<package>': {'old': '<old-version>',
        'new': '<new-version>']}

CLI Example:

salt '*' pkg.install <package name>
salt.modules.ebuild.list_pkgs()

List the packages currently installed in a dict:

{'<package_name>': '<version>'}

CLI Example:

salt '*' pkg.list_pkgs
salt.modules.ebuild.purge(pkg)

Portage does not have a purge, this function calls remove

Return a list containing the removed packages:

CLI Example:

salt '*' pkg.purge <package name>
salt.modules.ebuild.refresh_db()

Updates the portage tree (emerge --sync)

CLI Example:

salt '*' pkg.refresh_db
salt.modules.ebuild.remove(pkg)

Remove a single package via emerge --unmerge

Return a list containing the names of the removed packages:

CLI Example:

salt '*' pkg.remove <package name>
salt.modules.ebuild.update(pkg, refresh=False)

Updates the passed package (emerge --update package)

Return a dict containing the new package names and versions:

{'<package>': {'old': '<old-version>',
        'new': '<new-version>']}

CLI Example:

salt '*' pkg.update <package name>
salt.modules.ebuild.upgrade(refresh=False)

Run a full system upgrade (emerge --update world)

Return a dict containing the new package names and versions:

{'<package>': {'old': '<old-version>',
        'new': '<new-version>']}

CLI Example:

salt '*' pkg.upgrade
salt.modules.ebuild.version(name)

Returns a version if the package is installed, else returns an empty string

CLI Example:

salt '*' pkg.version <package name>

Comments

comments powered by Disqus

Parent topic

Previous topic

salt.modules.djangomod

Next topic

salt.modules.event