Package support for XBPS package manager (used by VoidLinux)
New in version 2016.11.0.
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]
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> ...
Remove an XBPS repository from the system.
url of repo to remove (persistent).
CLI Examples:
salt '*' pkg.del_repo <repo url>
Display information about the repo.
CLI Examples:
salt '*' pkg.get_repo 'repo-url'
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>
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> ...
List the packages currently installed as a dict:
{'<package_name>': '<version>'}
CLI Example:
salt '*' pkg.list_pkgs
List all repos known by XBPS
CLI Example:
salt '*' pkg.list_repos
Check whether or not an upgrade is available for all packages
CLI Example:
salt '*' pkg.list_upgrades
Update list of available packages from installed repos
CLI Example:
salt '*' pkg.refresh_db
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]
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
Check whether or not an upgrade is available for a given package
CLI Example:
salt '*' pkg.upgrade_available <package name>
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> ...