{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/47909","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/47909/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/47909/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/47909/events","html_url":"https://github.com/saltstack/salt/pull/47909","id":328108388,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNzMwMzYx","number":47909,"title":"Fix salt.states.pkg.latest for IPS packages on Solaris","user":{"login":"gmsoft-tuxicoman","id":2064119,"node_id":"MDQ6VXNlcjIwNjQxMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/2064119?v=4","gravatar_id":"","url":"https://api.github.com/users/gmsoft-tuxicoman","html_url":"https://github.com/gmsoft-tuxicoman","followers_url":"https://api.github.com/users/gmsoft-tuxicoman/followers","following_url":"https://api.github.com/users/gmsoft-tuxicoman/following{/other_user}","gists_url":"https://api.github.com/users/gmsoft-tuxicoman/gists{/gist_id}","starred_url":"https://api.github.com/users/gmsoft-tuxicoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmsoft-tuxicoman/subscriptions","organizations_url":"https://api.github.com/users/gmsoft-tuxicoman/orgs","repos_url":"https://api.github.com/users/gmsoft-tuxicoman/repos","events_url":"https://api.github.com/users/gmsoft-tuxicoman/events{/privacy}","received_events_url":"https://api.github.com/users/gmsoft-tuxicoman/received_events","type":"User","site_admin":false},"labels":[{"id":71248262,"node_id":"MDU6TGFiZWw3MTI0ODI2Mg==","url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-31T11:54:46Z","updated_at":"2018-06-04T05:14:30Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/47909","html_url":"https://github.com/saltstack/salt/pull/47909","diff_url":"https://github.com/saltstack/salt/pull/47909.diff","patch_url":"https://github.com/saltstack/salt/pull/47909.patch"},"body":"### What does this PR do?\r\nFix salt.states.pkg.latest for IPS packages on Solaris.\r\n\r\n### What issues does this PR fix or reference?\r\n\r\nNone.\r\n\r\n### Previous Behavior\r\nCurrently the state function pkg.latest is broken with the solarisips provider because the modules functions solarisips.install() and solarisips.latest_version() don't return the expected value in some cases.\r\n\r\n### New Behavior\r\nThe module install() now returns an empty dict if the package is already installed.\r\nThe latest_version() now returns an empty string for packages already at the latest version.\r\nThe version() function ignores the return code of pkg list to avoid errors when checking the version of non installed packages.\r\n\r\n### Tests written?\r\n\r\nNo\r\n\r\n### Commits signed with GPG?\r\n\r\nNo\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/394236293","html_url":"https://github.com/saltstack/salt/pull/47909#issuecomment-394236293","issue_url":"https://api.github.com/repos/saltstack/salt/issues/47909","id":394236293,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDIzNjI5Mw==","user":{"login":"damon-atkins","id":9368124,"node_id":"MDQ6VXNlcjkzNjgxMjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9368124?v=4","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":"2018-06-04T05:14:29Z","updated_at":"2018-06-04T05:14:29Z","author_association":"CONTRIBUTOR","body":"Looks like you need to use `pkg list -Hvfa`  which will give you all pkg names and all versions. Cache this as a pkg and version available lookup table for every package.  Which would allow you to do wildcard lookup and latest version lookup.\r\n"}}
{"actor":{"display_login":"damon-atkins"}}