{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/36302","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/36302/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/36302/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/36302/events","html_url":"https://github.com/saltstack/salt/issues/36302","id":176958695,"number":36302,"title":"Salt+Windows only sees the latest package when using repong","user":{"login":"stjack99","id":1747094,"avatar_url":"https://avatars.githubusercontent.com/u/1747094?v=3","gravatar_id":"","url":"https://api.github.com/users/stjack99","html_url":"https://github.com/stjack99","followers_url":"https://api.github.com/users/stjack99/followers","following_url":"https://api.github.com/users/stjack99/following{/other_user}","gists_url":"https://api.github.com/users/stjack99/gists{/gist_id}","starred_url":"https://api.github.com/users/stjack99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stjack99/subscriptions","organizations_url":"https://api.github.com/users/stjack99/orgs","repos_url":"https://api.github.com/users/stjack99/repos","events_url":"https://api.github.com/users/stjack99/events{/privacy}","received_events_url":"https://api.github.com/users/stjack99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-14T16:41:24Z","updated_at":"2016-09-14T18:08:28Z","closed_at":null,"body":"### Description of Issue/Question\r\n**Note**: I've only tested this using win/repo-ng\r\n\r\nI have a repo defined with >= 2 items in it. Salt-call pkg.available_version will only show the latest version as being available. Pkg.list_available lists both versions as being available.\r\n\r\nIf I have version 1 installed, enable version 2 in the repo, and pkg.install the 2nd, both versions get installed. Salt does not try to uninstall the old one first. I wrote a state that first uninstalls version 1, then install version two, but the uninstall state says that version 1 isn't installed even though I've specified it should uninstall version 1.\r\n\r\nIt looks like Salt will only recognize the latest version. So, when it's time to install version 2, it doesn't care about version 1, doesn't see it, and doesn't uninstall it first.\r\n\r\n### Setup\r\n**repo-ng/app.sls**\r\napp:\r\n  {% for version in (('18.2.22'), ('18.2.28')) %}\r\n  '{{ version }}':\r\n    full_name: 'Clunky Application'\r\n    installer: 'http://herp.derp.com/installs/app/{{ version }}/appInstaller.exe'\r\n    installer: 'http://herp.derp.com/installs/app/{{ version }}/appInstaller.exe'\r\n    install_flags: '/s /v\"/qn\"'\r\n    uninstall_flags: '/s /x /v\"/qn\"'\r\n    msiexec: False\r\n    locale: en_US\r\n    reboot: False\r\n  {% endfor %}\r\n\r\n**states/app.sls**\r\napp-install:\r\n  pkg.installed:\r\n    - pkgs:\r\n      - app: '18.2.28'\r\n    - require:\r\n      - pkg: app-remove-old-versions\r\n\r\napp-remove-old-versions:\r\n  pkg.removed:\r\n    - name: app\r\n    - version: '18.2.22'\r\n\r\n### Steps to Reproduce Issue\r\nNote: 18.2.22 is installed and is shown correctly in pkg.list_pkgs\r\n\r\nWhen I execute the app state, I get:\r\n  > salt-call state.sls app\r\n  [ERROR   ] app None not installed\r\n  local:\r\n      ----------\r\n      app:\r\n          ----------\r\n          current:\r\n              18.2.28 not installed\r\n\r\nAlso, If I do a pkg.remove, I get\r\n  [ERROR   ] app None not installed\r\n  local:\r\n      ----------\r\n      app:\r\n          ----------\r\n          current:\r\n              18.2.28 not installed\r\n\r\n### Versions Report\r\n**Master**\r\nSalt Version:\r\n           Salt: 2016.3.2\r\n \r\nDependency Versions:\r\n           cffi: 1.7.0\r\n       cherrypy: 3.2.2\r\n       dateutil: 2.5.0\r\n          gitdb: 0.6.4\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: 0.23.4\r\n        libnacl: Not Installed\r\n       M2Crypto: 0.24.0\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.7\r\n   mysql-python: Not Installed\r\n      pycparser: 2.10\r\n       pycrypto: 2.6.1\r\n         pygit2: 0.23.2\r\n         Python: 2.7.12 (default, Jul 26 2016, 12:56:51)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.3.0\r\n           RAET: Not Installed\r\n          smmap: 0.9.0\r\n        timelib: Not Installed\r\n        Tornado: 4.4.1\r\n            ZMQ: 4.1.5\r\n \r\nSystem Versions:\r\n           dist:   \r\n        machine: amd64\r\n        release: 10.3-RELEASE-p7\r\n         system: FreeBSD\r\n        version: Not Installed\r\n\r\n**Minion**\r\nVersions tested: 2016.3.2, 2016.3.3\r\nSalt Version:\r\n           Salt: 2016.3.3\r\n\r\nDependency Versions:\r\n           cffi: 1.6.0\r\n       cherrypy: 5.3.0\r\n       dateutil: 2.5.3\r\n          gitdb: 0.6.4\r\n      gitpython: 2.0.2\r\n          ioflo: 1.5.3\r\n         Jinja2: 2.8\r\n        libgit2: Not Installed\r\n        libnacl: 1.4.5\r\n       M2Crypto: Not Installed\r\n           Mako: 1.0.4\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.7\r\n   mysql-python: Not Installed\r\n      pycparser: 2.14\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.12 (v2.7.12:d33e0cf91556, Jun 2\r\n0 64 bit (AMD64)]\r\n   python-gnupg: 0.3.8\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.2.0\r\n           RAET: Not Installed\r\n          smmap: 0.9.0\r\n        timelib: 0.2.4\r\n        Tornado: 4.3\r\n            ZMQ: 4.1.2\r\n\r\nSystem Versions:\r\n           dist:\r\n        machine: AMD64\r\n        release: 7\r\n         system: Windows\r\n        version: 7 6.1.7601 SP1 Multiprocessor Free"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/247104294","html_url":"https://github.com/saltstack/salt/issues/36302#issuecomment-247104294","issue_url":"https://api.github.com/repos/saltstack/salt/issues/36302","id":247104294,"user":{"login":"damon-atkins","id":9368124,"avatar_url":"https://avatars.githubusercontent.com/u/9368124?v=3","gravatar_id":"","url":"https://api.github.com/users/damon-atkins","html_url":"https://github.com/damon-atkins","followers_url":"https://api.github.com/users/damon-atkins/followers","following_url":"https://api.github.com/users/damon-atkins/following{/other_user}","gists_url":"https://api.github.com/users/damon-atkins/gists{/gist_id}","starred_url":"https://api.github.com/users/damon-atkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damon-atkins/subscriptions","organizations_url":"https://api.github.com/users/damon-atkins/orgs","repos_url":"https://api.github.com/users/damon-atkins/repos","events_url":"https://api.github.com/users/damon-atkins/events{/privacy}","received_events_url":"https://api.github.com/users/damon-atkins/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T18:08:28Z","updated_at":"2016-09-14T18:08:28Z","body":"available_version is being deprecated it just calls latest_version\r\nsalt-call -l info pkg.refresh_db\r\nthen try\r\nsalt-call -l debug pkg.refresh_db   # don't post this, way to big.\r\n"}}
{"actor":{"display_login":"damon-atkins"}}