{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/67363756","id":67363756,"diff_hunk":"@@ -159,6 +172,11 @@ def install\n         self.debug \"Downgrading package #{@resource[:name]} from version #{is[:ensure]} to #{should}\"\n         operation = :downgrade\n       end\n+\n+      if is && rpm_compareEVR(rpm_parse_evr(should), rpm_parse_evr(is[:ensure])) > 0","path":"lib/puppet/provider/package/yum.rb","position":null,"original_position":28,"commit_id":"0fbce6530b47f9d723785cff7a2d7673cd1fe10e","original_commit_id":"e6636cbb742d00d6fe91ab8b4eb06a0f1047afae","user":{"login":"petems","id":1064715,"avatar_url":"https://avatars.githubusercontent.com/u/1064715?v=3","gravatar_id":"","url":"https://api.github.com/users/petems","html_url":"https://github.com/petems","followers_url":"https://api.github.com/users/petems/followers","following_url":"https://api.github.com/users/petems/following{/other_user}","gists_url":"https://api.github.com/users/petems/gists{/gist_id}","starred_url":"https://api.github.com/users/petems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petems/subscriptions","organizations_url":"https://api.github.com/users/petems/orgs","repos_url":"https://api.github.com/users/petems/repos","events_url":"https://api.github.com/users/petems/events{/privacy}","received_events_url":"https://api.github.com/users/petems/received_events","type":"User","site_admin":false},"body":"Cool, fixed to that. I also changed `is` because that variable name seems too vague","created_at":"2016-06-16T15:13:59Z","updated_at":"2016-06-16T15:13:59Z","html_url":"https://github.com/puppetlabs/puppet/pull/4973#discussion_r67363756","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/67363756"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4973#discussion_r67363756"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973","id":70714764,"html_url":"https://github.com/puppetlabs/puppet/pull/4973","diff_url":"https://github.com/puppetlabs/puppet/pull/4973.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/4973.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4973","number":4973,"state":"open","locked":false,"title":"(PUP-6324) Allow DNF to update packages","user":{"login":"petems","id":1064715,"avatar_url":"https://avatars.githubusercontent.com/u/1064715?v=3","gravatar_id":"","url":"https://api.github.com/users/petems","html_url":"https://github.com/petems","followers_url":"https://api.github.com/users/petems/followers","following_url":"https://api.github.com/users/petems/following{/other_user}","gists_url":"https://api.github.com/users/petems/gists{/gist_id}","starred_url":"https://api.github.com/users/petems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petems/subscriptions","organizations_url":"https://api.github.com/users/petems/orgs","repos_url":"https://api.github.com/users/petems/repos","events_url":"https://api.github.com/users/petems/events{/privacy}","received_events_url":"https://api.github.com/users/petems/received_events","type":"User","site_admin":false},"body":"* `dnf` inherits from `yum`\r\n* `yum` allows the updating of packages with `install`\r\n* `dnf` does not:\r\n```\r\n/bin/dnf -y install cockpit\r\nLast metadata expiration check performed 0:18:07 ago on Thu May 19 13:40:06 2016.\r\nPackage cockpit-0.67-2.fc22.x86_64 is already installed, skipping.\r\nDependencies resolved.\r\nNothing to do.\r\nComplete!\r\n```\r\n* ~~So with the `dnf` provider, we need to use the `upgrade` command if the user is trying to install anything newer than the current install~~\r\n\r\nEDIT: After some reading I've moved the login into the yum provider, same behaviour.\r\n\r\nAlso DRY'd up the specs as I was getting bored of copy+pasting the stuff from the Yum provider specs 😄 ","created_at":"2016-05-19T15:27:05Z","updated_at":"2016-06-16T15:13:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4036363e8ee5c47bb8a0e62744724a3a80d783b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4973/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/0fbce6530b47f9d723785cff7a2d7673cd1fe10e","head":{"label":"petems:PUP-6324-dnf_cannot_upgrade_packages","ref":"PUP-6324-dnf_cannot_upgrade_packages","sha":"0fbce6530b47f9d723785cff7a2d7673cd1fe10e","user":{"login":"petems","id":1064715,"avatar_url":"https://avatars.githubusercontent.com/u/1064715?v=3","gravatar_id":"","url":"https://api.github.com/users/petems","html_url":"https://github.com/petems","followers_url":"https://api.github.com/users/petems/followers","following_url":"https://api.github.com/users/petems/following{/other_user}","gists_url":"https://api.github.com/users/petems/gists{/gist_id}","starred_url":"https://api.github.com/users/petems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petems/subscriptions","organizations_url":"https://api.github.com/users/petems/orgs","repos_url":"https://api.github.com/users/petems/repos","events_url":"https://api.github.com/users/petems/events{/privacy}","received_events_url":"https://api.github.com/users/petems/received_events","type":"User","site_admin":false},"repo":{"id":16104292,"name":"puppet","full_name":"petems/puppet","owner":{"login":"petems","id":1064715,"avatar_url":"https://avatars.githubusercontent.com/u/1064715?v=3","gravatar_id":"","url":"https://api.github.com/users/petems","html_url":"https://github.com/petems","followers_url":"https://api.github.com/users/petems/followers","following_url":"https://api.github.com/users/petems/following{/other_user}","gists_url":"https://api.github.com/users/petems/gists{/gist_id}","starred_url":"https://api.github.com/users/petems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petems/subscriptions","organizations_url":"https://api.github.com/users/petems/orgs","repos_url":"https://api.github.com/users/petems/repos","events_url":"https://api.github.com/users/petems/events{/privacy}","received_events_url":"https://api.github.com/users/petems/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petems/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/petems/puppet","forks_url":"https://api.github.com/repos/petems/puppet/forks","keys_url":"https://api.github.com/repos/petems/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petems/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petems/puppet/teams","hooks_url":"https://api.github.com/repos/petems/puppet/hooks","issue_events_url":"https://api.github.com/repos/petems/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/petems/puppet/events","assignees_url":"https://api.github.com/repos/petems/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/petems/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/petems/puppet/tags","blobs_url":"https://api.github.com/repos/petems/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petems/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petems/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/petems/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petems/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/petems/puppet/languages","stargazers_url":"https://api.github.com/repos/petems/puppet/stargazers","contributors_url":"https://api.github.com/repos/petems/puppet/contributors","subscribers_url":"https://api.github.com/repos/petems/puppet/subscribers","subscription_url":"https://api.github.com/repos/petems/puppet/subscription","commits_url":"https://api.github.com/repos/petems/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/petems/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/petems/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/petems/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/petems/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/petems/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petems/puppet/merges","archive_url":"https://api.github.com/repos/petems/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petems/puppet/downloads","issues_url":"https://api.github.com/repos/petems/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/petems/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/petems/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/petems/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petems/puppet/labels{/name}","releases_url":"https://api.github.com/repos/petems/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/petems/puppet/deployments","created_at":"2014-01-21T14:10:44Z","updated_at":"2014-06-02T15:40:07Z","pushed_at":"2016-06-16T15:13:42Z","git_url":"git://github.com/petems/puppet.git","ssh_url":"git@github.com:petems/puppet.git","clone_url":"https://github.com/petems/puppet.git","svn_url":"https://github.com/petems/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":52104,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"5bd2034b5c2dff0617b9429243a12e5447570364","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppet/deployments","created_at":"2010-09-14T19:26:44Z","updated_at":"2016-06-15T11:45:54Z","pushed_at":"2016-06-16T15:13:45Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":80610,"stargazers_count":4013,"watchers_count":4013,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1663,"mirror_url":null,"open_issues_count":45,"forks":1663,"open_issues":45,"watchers":4013,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4973"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4973"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4973/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4973/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/0fbce6530b47f9d723785cff7a2d7673cd1fe10e"}}}}
{"actor":{"display_login":"petems"}}