saltstack/salt — pull request #16503 by terminalmage (2014-10-09 06:40:16+00:00)
Title: Fix output of pkg.list_repo_pkgs (yumpkg)

This allows for the full list of available packages in each repo to be
returned. This was my original intention when I wrote this function, but I
didn't realize that I was missing versions in the output until I researched
github issue #16467.

The structure of the return dict had to be changed slightly to accommodate the
new behavior.

Additionally, rather than just sorting each list in place, this sorts all
versions for a given package in a given repo using
distuils.version.LooseVersion, to give an accurate sorting of versions, and
put the newest versions at the top of the list.