Package support for XBPS package manager (used by VoidLinux)
New in version 2016.11.0.
salt.modules.xbpspkg.
add_repo
(repo, conffile='/usr/share/xbps.d/15-saltstack.conf')¶Add an XBPS repository to the system.
url of repo to add (persistent).
path to xbps conf file to add this repo default: /usr/share/xbps.d/15-saltstack.conf
CLI Examples:
salt '*' pkg.add_repo <repo url> [conffile=/path/to/xbps/repo.conf]
salt.modules.xbpspkg.
available_version
(*names, **kwargs)¶Return the latest version of the named package available for upgrade or installation. If more than one package name is specified, a dict of name/version pairs is returned.
If the latest version of a given package is already installed, an empty string will be returned for that package.
CLI Example:
salt '*' pkg.latest_version <package name>
salt '*' pkg.latest_version <package1> <package2> <package3> ...
salt.modules.xbpspkg.
del_repo
(repo)¶Remove an XBPS repository from the system.
url of repo to remove (persistent).
CLI Examples:
salt '*' pkg.del_repo <repo url>
salt.modules.xbpspkg.
get_repo
(repo, **kwargs)¶Display information about the repo.
CLI Examples:
salt '*' pkg.get_repo 'repo-url'
salt.modules.xbpspkg.
install
(name=None, refresh=False, fromrepo=None, pkgs=None, sources=None, **kwargs)¶Install the passed package
The name of the package to be installed.
Whether or not to refresh the package database before installing.
Specify a package repository (url) to install from.
Multiple Package Installation Options:
A list of packages to install from a software repository. Must be passed as a python list.
CLI Example:
salt '*' pkg.install pkgs='["foo","bar"]'
A list of packages to install. Must be passed as a list of dicts, with the keys being package names, and the values being the source URI or local path to the package.
CLI Example:
salt '*' pkg.install sources='[{"foo": "salt://foo.deb"},{"bar": "salt://bar.deb"}]'
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.xbpspkg.
latest_version
(*names, **kwargs)¶Return the latest version of the named package available for upgrade or installation. If more than one package name is specified, a dict of name/version pairs is returned.
If the latest version of a given package is already installed, an empty string will be returned for that package.
CLI Example:
salt '*' pkg.latest_version <package name>
salt '*' pkg.latest_version <package1> <package2> <package3> ...
salt.modules.xbpspkg.
list_pkgs
(versions_as_list=False, **kwargs)¶List the packages currently installed as a dict:
{'<package_name>': '<version>'}
CLI Example:
salt '*' pkg.list_pkgs
salt.modules.xbpspkg.
list_repos
()¶List all repos known by XBPS
CLI Example:
salt '*' pkg.list_repos
salt.modules.xbpspkg.
list_upgrades
(refresh=True)¶Check whether or not an upgrade is available for all packages
CLI Example:
salt '*' pkg.list_upgrades
salt.modules.xbpspkg.
refresh_db
()¶Update list of available packages from installed repos
CLI Example:
salt '*' pkg.refresh_db
salt.modules.xbpspkg.
remove
(name=None, pkgs=None, recursive=True, **kwargs)¶The name of the package to be deleted.
Also remove dependent packages (not required elsewhere). Default mode: enabled.
Multiple Package Options:
A list of packages to delete. Must be passed as a python list. The
name
parameter will be ignored if this option is passed.
Returns a list containing the removed packages.
CLI Example:
salt '*' pkg.remove <package name> [recursive=False]
salt '*' pkg.remove <package1>,<package2>,<package3> [recursive=False]
salt '*' pkg.remove pkgs='["foo", "bar"]' [recursive=False]
salt.modules.xbpspkg.
upgrade
(refresh=True)¶Run a full system upgrade
Whether or not to refresh the package database before installing. Default is True.
Returns a dictionary containing the changes:
{'<package>': {'old': '<old-version>',
'new': '<new-version>'}}
CLI Example:
salt '*' pkg.upgrade
salt.modules.xbpspkg.
upgrade_available
(name)¶Check whether or not an upgrade is available for a given package
CLI Example:
salt '*' pkg.upgrade_available <package name>
salt.modules.xbpspkg.
version
(*names, **kwargs)¶Returns a string representing the package version or an empty string if not installed. If more than one package name is specified, a dict of name/version pairs is returned.
CLI Example:
salt '*' pkg.version <package name>
salt '*' pkg.version <package1> <package2> <package3> ...