salt
salt copied to clipboard
apt available_version should sort
I have two versions of salt available in my package cache:
djs-admin@thames:~$ apt-cache -q show salt-master|grep ^Version
Version: 0.10.0-1ubuntu5
Version: 0.9.5.1.pre-v0.9.5-1-ga8fdf7db-1
but pkg.available_versions shows the last one listed, instead of the highest listed:
djs-admin@thames:~$ sudo salt 'thames*' pkg.available_version salt-master
{'thames.office.adelard.com': '0.9.5.1.pre-v0.9.5-1-ga8fdf7db-1'}
Very definitively a bug! Thanks!
What if we were to take the output of apt-cache policy and compare Installed with Candidate? For example:
$ apt-cache policy sudo
sudo:
Installed: 1.8.3p1-1ubuntu3.3
Candidate: 1.8.3p1-1ubuntu3.3
Version table:
1.8.5p2-1ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
*** 1.8.3p1-1ubuntu3.3 0
900 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
100 /var/lib/dpkg/status
1.8.3p1-1ubuntu3.2 0
900 http://us.archive.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
1.8.3p1-1ubuntu3 0
900 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
Note that version 1.8.5p2-1ubuntu1 is available but is not a candidate due to certain apt preferences. See https://github.com/saltstack/salt/issues/1772 for the back story.
This is good thinking, and something that we should add in.