{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/36222","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/36222/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/36222/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/36222/events","html_url":"https://github.com/saltstack/salt/pull/36222","id":176297514,"number":36222,"title":"Update to PR 35899 win_pkg","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":41,"created_at":"2016-09-12T05:31:55Z","updated_at":"2016-09-26T05:25:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/36222","html_url":"https://github.com/saltstack/salt/pull/36222","diff_url":"https://github.com/saltstack/salt/pull/36222.diff","patch_url":"https://github.com/saltstack/salt/pull/36222.patch"},"body":"### What does this PR do?\r\n*modules/win_pkg.py*\r\nCode clean up and improvements based on feed back on the original PR\r\ne.g. dealing with configuration options, and  refresh_db\r\nAlso:\r\n- add missing doco mainly around parameters for functions\r\n- Memory caching of the metadata db per run, instead of reading it multiple times\r\nfrom disk.\r\n- centralised the refresh test, instead of a if statement in most functions, allow better logging etc \r\n- list_available issue with code which tried sort the list, did not. Now Fixed\r\n- previous updates for saltenv changes in develop several months ago broke compatibility with older 2015 and 2016 release, updates here to try to fix this.\r\ne.g.\r\n```\r\n2016 def list_available(*names):\r\ndevelop def list_available(saltenv='base', *names)\r\nfixed to def list_available(*names, **kwargs)  saltenv taken from kwargs\r\n```\r\n*states/pkg.py Fixes*\r\n- Fixes installed() in states/pkg.py which was calling calling refresh DB to much. This involved replacing the current code with a new function called _refresh_tag_file()\r\n- latest()  in states/pkgpy change to use the new function _refresh_tag_file()\r\n- remove windows specific code around refreshing db\r\n\r\nNote this commit for states/pkg.py (cd16f7f) should be back ported to older version which still have this issue.\r\n\r\n\r\n### What issues does this PR fix or reference?\r\nSee PR 35899\r\n### Previous Behavior\r\nCarbon branch has compatibility issues with 2015 and 2016 with saltenv changes\r\nMissing metadata db was reported as an error\r\n### New Behavior\r\nMore compatible with 2015 and 2016 re saltenv\r\nPackage State Files fetched and metadata created if missing or stale. \r\n### Tests written?\r\nNo Updates tests\r\n\r\nPlease review [Salt's Contributing Guide](https://docs.saltstack.com/en/latest/topics/development/contributing.html) for best practices.\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/249481902","html_url":"https://github.com/saltstack/salt/pull/36222#issuecomment-249481902","issue_url":"https://api.github.com/repos/saltstack/salt/issues/36222","id":249481902,"user":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T05:25:20Z","updated_at":"2016-09-26T05:25:20Z","body":"@damon-atkins OK, if you are satisfied then I can submit my changes as a pull request to your fork, and once merged my changes will show up in this PR and we can get it merged."}}
{"actor":{"display_login":"terminalmage"}}