{"action":"opened","number":4,"pull_request":{"url":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/4","id":115372500,"html_url":"https://github.com/Yelp/puppet-package_purging/pull/4","diff_url":"https://github.com/Yelp/puppet-package_purging/pull/4.diff","patch_url":"https://github.com/Yelp/puppet-package_purging/pull/4.patch","issue_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/4","number":4,"state":"open","locked":false,"title":"Monkey patch the standard dpkg Package provider","user":{"login":"giuliano108","id":615907,"avatar_url":"https://avatars3.githubusercontent.com/u/615907?v=3","gravatar_id":"","url":"https://api.github.com/users/giuliano108","html_url":"https://github.com/giuliano108","followers_url":"https://api.github.com/users/giuliano108/followers","following_url":"https://api.github.com/users/giuliano108/following{/other_user}","gists_url":"https://api.github.com/users/giuliano108/gists{/gist_id}","starred_url":"https://api.github.com/users/giuliano108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giuliano108/subscriptions","organizations_url":"https://api.github.com/users/giuliano108/orgs","repos_url":"https://api.github.com/users/giuliano108/repos","events_url":"https://api.github.com/users/giuliano108/events{/privacy}","received_events_url":"https://api.github.com/users/giuliano108/received_events","type":"User","site_admin":false},"body":"The `held_apt` and `held_aptitude` providers exist just to \"remove\" [this line](https://github.com/puppetlabs/puppet/blob/c6a7f09237a7f6a2e8040df98c92e9ab8a964aab/lib/puppet/provider/package/dpkg.rb#L70).\r\n\r\nWhat we want is for Puppet to stop exposing the \"held\" state as one of the values that the `ensure` property can take. The standard behaviour for Puppet, when a held `dummypkg` package is pinned to version `0.0.3` in the catalog, is to always:\r\n\r\n```\r\nNotice: /Stage[main]/Main/Package[dummypkg]/ensure: ensure changed 'held' to '0.0.3'\r\n```\r\n\r\nThe catalog never converges, as discussed in #3. Another [PR](https://github.com/puppetlabs/puppet/pull/2770) (not from us) deals with the same subject. The worse thing about this behaviour is that _services depending on `dummypkg` will be restarted_ even though, effectively, no packages were upgraded.\r\n\r\nThe issue with `held_aptitude`/`held_apt` is that you need to explicitly use them. `held_apt` is set as `defaultfor :osfamily => :debian`, but some vendor modules do [this](https://github.com/puppetlabs/puppetlabs-rabbitmq/blob/f999c748d7634c438632376c07c3144f3170015e/manifests/params.pp#L23), not allowing the `defaultfor` to work.\r\n\r\nWith @oholiab, we tried a different approach:\r\n\r\n- Get rid of both `held_apt` and `held_aptitude`.\r\n- Monkey patch `dpkg`.\r\n- Add a test case for explicit uses of `provider => 'apt'`.\r\n\r\n`held_aptitude` and `help_apt` are risky because you need to make sure no traces of `aptitude` or `apt` are left in your catalog.  The new approach looks safer, unless there's a way for `dpkg` to be loaded after the code in `zz_no_hold_dpkg.rb`.\r\n\r\nTest run [output](https://i.fluffy.cc/Pt0j033mfHpZcPq97rcNMF4fJ8hNWk1M.txt) (2.4MB).\r\n\r\n/cc @hashbrowncipher","created_at":"2017-04-11T17:23:27Z","updated_at":"2017-04-11T17:23:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"giuliano108","id":615907,"avatar_url":"https://avatars3.githubusercontent.com/u/615907?v=3","gravatar_id":"","url":"https://api.github.com/users/giuliano108","html_url":"https://github.com/giuliano108","followers_url":"https://api.github.com/users/giuliano108/followers","following_url":"https://api.github.com/users/giuliano108/following{/other_user}","gists_url":"https://api.github.com/users/giuliano108/gists{/gist_id}","starred_url":"https://api.github.com/users/giuliano108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giuliano108/subscriptions","organizations_url":"https://api.github.com/users/giuliano108/orgs","repos_url":"https://api.github.com/users/giuliano108/repos","events_url":"https://api.github.com/users/giuliano108/events{/privacy}","received_events_url":"https://api.github.com/users/giuliano108/received_events","type":"User","site_admin":false},"assignees":[{"login":"giuliano108","id":615907,"avatar_url":"https://avatars3.githubusercontent.com/u/615907?v=3","gravatar_id":"","url":"https://api.github.com/users/giuliano108","html_url":"https://github.com/giuliano108","followers_url":"https://api.github.com/users/giuliano108/followers","following_url":"https://api.github.com/users/giuliano108/following{/other_user}","gists_url":"https://api.github.com/users/giuliano108/gists{/gist_id}","starred_url":"https://api.github.com/users/giuliano108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giuliano108/subscriptions","organizations_url":"https://api.github.com/users/giuliano108/orgs","repos_url":"https://api.github.com/users/giuliano108/repos","events_url":"https://api.github.com/users/giuliano108/events{/privacy}","received_events_url":"https://api.github.com/users/giuliano108/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/4/comments","statuses_url":"https://api.github.com/repos/Yelp/puppet-package_purging/statuses/04575ba2f6fc4dc017668eebaac55ddc0c875a01","head":{"label":"Yelp:monkey_patch_dpkg","ref":"monkey_patch_dpkg","sha":"04575ba2f6fc4dc017668eebaac55ddc0c875a01","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars2.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":77673634,"name":"puppet-package_purging","full_name":"Yelp/puppet-package_purging","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars2.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/puppet-package_purging","description":"Puppet types to purge unneeded system packages","fork":true,"url":"https://api.github.com/repos/Yelp/puppet-package_purging","forks_url":"https://api.github.com/repos/Yelp/puppet-package_purging/forks","keys_url":"https://api.github.com/repos/Yelp/puppet-package_purging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/puppet-package_purging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/puppet-package_purging/teams","hooks_url":"https://api.github.com/repos/Yelp/puppet-package_purging/hooks","issue_events_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/puppet-package_purging/events","assignees_url":"https://api.github.com/repos/Yelp/puppet-package_purging/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/puppet-package_purging/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/puppet-package_purging/tags","blobs_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/puppet-package_purging/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/puppet-package_purging/languages","stargazers_url":"https://api.github.com/repos/Yelp/puppet-package_purging/stargazers","contributors_url":"https://api.github.com/repos/Yelp/puppet-package_purging/contributors","subscribers_url":"https://api.github.com/repos/Yelp/puppet-package_purging/subscribers","subscription_url":"https://api.github.com/repos/Yelp/puppet-package_purging/subscription","commits_url":"https://api.github.com/repos/Yelp/puppet-package_purging/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/puppet-package_purging/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yelp/puppet-package_purging/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/puppet-package_purging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/puppet-package_purging/merges","archive_url":"https://api.github.com/repos/Yelp/puppet-package_purging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/puppet-package_purging/downloads","issues_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/puppet-package_purging/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/puppet-package_purging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/puppet-package_purging/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/puppet-package_purging/releases{/id}","deployments_url":"https://api.github.com/repos/Yelp/puppet-package_purging/deployments","created_at":"2016-12-30T08:42:01Z","updated_at":"2016-12-30T08:42:03Z","pushed_at":"2017-04-11T17:14:21Z","git_url":"git://github.com/Yelp/puppet-package_purging.git","ssh_url":"git@github.com:Yelp/puppet-package_purging.git","clone_url":"https://github.com/Yelp/puppet-package_purging.git","svn_url":"https://github.com/Yelp/puppet-package_purging","homepage":null,"size":60,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Yelp:master","ref":"master","sha":"e27e6c3ce00f67e755c4f53996f0b5be82660f58","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars2.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":77673634,"name":"puppet-package_purging","full_name":"Yelp/puppet-package_purging","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars2.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/puppet-package_purging","description":"Puppet types to purge unneeded system packages","fork":true,"url":"https://api.github.com/repos/Yelp/puppet-package_purging","forks_url":"https://api.github.com/repos/Yelp/puppet-package_purging/forks","keys_url":"https://api.github.com/repos/Yelp/puppet-package_purging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/puppet-package_purging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/puppet-package_purging/teams","hooks_url":"https://api.github.com/repos/Yelp/puppet-package_purging/hooks","issue_events_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/puppet-package_purging/events","assignees_url":"https://api.github.com/repos/Yelp/puppet-package_purging/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/puppet-package_purging/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/puppet-package_purging/tags","blobs_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/puppet-package_purging/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/puppet-package_purging/languages","stargazers_url":"https://api.github.com/repos/Yelp/puppet-package_purging/stargazers","contributors_url":"https://api.github.com/repos/Yelp/puppet-package_purging/contributors","subscribers_url":"https://api.github.com/repos/Yelp/puppet-package_purging/subscribers","subscription_url":"https://api.github.com/repos/Yelp/puppet-package_purging/subscription","commits_url":"https://api.github.com/repos/Yelp/puppet-package_purging/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/puppet-package_purging/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/puppet-package_purging/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yelp/puppet-package_purging/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/puppet-package_purging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/puppet-package_purging/merges","archive_url":"https://api.github.com/repos/Yelp/puppet-package_purging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/puppet-package_purging/downloads","issues_url":"https://api.github.com/repos/Yelp/puppet-package_purging/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/puppet-package_purging/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/puppet-package_purging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/puppet-package_purging/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/puppet-package_purging/releases{/id}","deployments_url":"https://api.github.com/repos/Yelp/puppet-package_purging/deployments","created_at":"2016-12-30T08:42:01Z","updated_at":"2016-12-30T08:42:03Z","pushed_at":"2017-04-11T17:14:21Z","git_url":"git://github.com/Yelp/puppet-package_purging.git","ssh_url":"git@github.com:Yelp/puppet-package_purging.git","clone_url":"https://github.com/Yelp/puppet-package_purging.git","svn_url":"https://github.com/Yelp/puppet-package_purging","homepage":null,"size":60,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/4"},"html":{"href":"https://github.com/Yelp/puppet-package_purging/pull/4"},"issue":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/4"},"comments":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Yelp/puppet-package_purging/statuses/04575ba2f6fc4dc017668eebaac55ddc0c875a01"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":150,"deletions":89,"changed_files":6}}
{"actor":{"display_login":"giuliano108"}}