Resources needed by pkg providers
Add a package to a dict of installed packages.
Examines target package names to make sure they were formatted properly. Returns a list of problems encountered.
Compares two version strings using distutils.version.LooseVersion. This is a fallback for providers which don't have a version comparison utility built into them. Return -1 if version1 < version2, 0 if version1 == version2, and 1 if version1 > version2. Return None if there was a problem making the comparison.
Compare before and after results from pkg.list_pkgs() to determine what changes were made to the packages installed on the minion.
Accepts list (or a string representing a list) and returns back either the list passed, or the list represenation of the string passed.
Example: '["foo","bar","baz"]' would become ["foo","bar","baz"]
Accepts list of dicts (or a string representing a list of dicts) and packs the key/value pairs into a single dict.
Example: '[{"foo": "salt://foo.rpm"}, {"bar": "salt://bar.rpm"}]' would become {"foo": "salt://foo.rpm", "bar": "salt://bar.rpm"}
Parses the input to pkg.install and returns back the package(s) to be installed. Returns a list of packages, as well as a string noting whether the packages are to come from a repository or a binary package.
Accepts a dict obtained from pkg.list_pkgs() and sorts in place the list of versions for any packages that have multiple versions installed, so that two package lists can be compared to one another.