Pkgutil support for Solaris
The available version of the package in the repository
CLI Example:
salt '*' pkgutil.available_version CSWpython
Compare two version strings.
CLI Example:
salt '*' pkg.compare '0.2.4-0' '<' '0.2.4.1-0'
salt '*' pkg.compare pkg1='0.2.4-0' oper='<' pkg2='0.2.4.1-0'
Install the named package using the pkgutil tool.
Returns a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>',
'new': '<new-version>'}}
CLI Example:
salt '*' pkgutil.install <package_name>
salt '*' pkgutil.install SMClgcc346
List the packages currently installed as a dict:
{'<package_name>': '<version>'}
CLI Example:
salt '*' pkgutil.list_pkgs
List all available package upgrades on this system
CLI Example:
salt '*' pkgutil.list_upgrades
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' '0.2.4.1-0'
salt '*' pkg.perform_cmp pkg1='0.2.4-0' pkg2='0.2.4.1-0'
Remove a package and all its dependencies which are not in use by other packages.
Returns a list containing the removed packages.
CLI Example:
salt '*' pkgutil.purge <package name>
Updates the pkgutil repo database (pkgutil -U)
CLI Example:
salt '*' pkgutil.refresh_db
Remove a package and all its dependencies which are not in use by other packages.
Returns a list containing the removed packages.
CLI Example:
salt '*' pkgutil.remove <package name>
salt '*' pkgutil.remove SMCliconv
Upgrade all of the packages to the latest available version.
Returns a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>',
'new': '<new-version>'}}
CLI Example:
salt '*' pkgutil.upgrade
Check if there is an upgrade available for a certain package
CLI Example:
salt '*' pkgutil.upgrade_available CSWpython
Returns a version if the package is installed, else returns an empty string
CLI Example:
salt '*' pkgutil.version CSWpython