{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppet/issues/4108","labels_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4108/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4108/comments","events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4108/events","html_url":"https://github.com/puppetlabs/puppet/pull/4108","id":97991292,"number":4108,"title":"(PUP-4865) Ensure error on yum install failure","user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars.githubusercontent.com/u/8162496?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-29T17:49:09Z","updated_at":"2015-07-29T18:59:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4108","html_url":"https://github.com/puppetlabs/puppet/pull/4108","diff_url":"https://github.com/puppetlabs/puppet/pull/4108.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/4108.patch"},"body":"In older yum versions, attempting to install a package that doesn't\r\nexist doesn't result in an error. Parse the yum output to identify\r\nfailure to install a package and throw an error.\r\n\r\nThe resulting error message is different on older vs newer ELs:\r\n#### EL-7\r\n```\r\nError: Execution of '/usr/bin/yum -d 0 -e 0 -y install not_a_package' returned 1: Error: Nothing to do\r\nError: /Stage[main]/Main/Package[not_a_package]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install not_a_package' returned 1: Error: Nothing to do`\r\n```\r\n\r\n#### EL-5\r\n```\r\nError: Could not find package not_a_package\r\nError: /Stage[main]/Main/Package[not_a_package]/ensure: change from purged to present failed: Could not find package not_a_package\r\n```"},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments/126059536","html_url":"https://github.com/puppetlabs/puppet/pull/4108#issuecomment-126059536","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4108","id":126059536,"user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars.githubusercontent.com/u/8162496?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T18:59:58Z","updated_at":"2015-07-29T18:59:58Z","body":"Verified acceptance test on centos 5 and centos 7 (x86_64)."}}