Package support for OpenBSD
Compare two version strings.
CLI Example:
salt '*' pkg.compare '0.2.4' '<' '0.2.4.1'
salt '*' pkg.compare pkg1='0.2.4' oper='<' pkg2='0.2.4.1'
Install the passed package
Return a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>',
'new': '<new-version>'}}
CLI Example, Install one package:
salt '*' pkg.install <package name>
CLI Example, Install more than one package:
salt '*' pkg.install pkgs='["<package name>", "<package name>"]'
CLI Example, Install more than one package from a alternate source (e.g. salt file-server, HTTP, FTP, local filesystem):
salt '*' pkg.install sources='[{"<pkg name>": "salt://pkgs/<pkg filename>"}]'
The available version of the package in the repository
CLI Example:
salt '*' pkg.latest_version <package name>
List the packages currently installed as a dict:
{'<package_name>': '<version>'}
CLI Example:
salt '*' pkg.list_pkgs
Do a cmp-style comparison on two packages. Return -1 if pkg1 < pkg2, 0 if pkg1 == pkg2, and 1 if pkg1 > pkg2. Return None if there was a problem making the comparison.
CLI Example:
salt '*' pkg.perform_cmp '0.2.4' '0.2.4.1'
salt '*' pkg.perform_cmp pkg1='0.2.4' pkg2='0.2.4.1'
Package purges are not supported, this function is identical to remove().
Multiple Package Options:
Returns a dict containing the changes.
CLI Example:
salt '*' pkg.purge <package name>
salt '*' pkg.purge <package1>,<package2>,<package3>
salt '*' pkg.purge pkgs='["foo", "bar"]'
Remove a single package with pkg_delete
Returns a list containing the removed packages.
CLI Example:
salt '*' pkg.remove <package name>
salt '*' pkg.remove <package1>,<package2>,<package3>
salt '*' pkg.remove pkgs='["foo", "bar"]'
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> ...