Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PE-17508) Fix puppet-agent suffix on fedora #154

Merged

Conversation

johnduarte
Copy link
Contributor

This commit modifies the install logic when osfamily is RedHat
to accommodate for the fedoraf package suffix when the OS is
fedora rather than an el derivative.

Prior to this commit the puppet-agent package would be suffixed
with el which does not match the package naming convention for
fedora.

@johnduarte johnduarte force-pushed the pe-17508-use-fedoraf-package-suffix branch from ce5b97b to cd4ce6e Compare September 16, 2016 22:47
This commit modifies the install logic when `osfamily` is `RedHat`
to accommodate for the `fedoraf` package suffix when the OS is
fedora rather than an `el` derivative.

Prior to this commit the `puppet-agent` package would be suffixed
with `el` which does not match the package naming convention for
fedora.
@johnduarte johnduarte force-pushed the pe-17508-use-fedoraf-package-suffix branch from cd4ce6e to c1c77dc Compare September 16, 2016 23:12
package { $::puppet_agent::package_name:
ensure => "${package_version}-1.el${::operatingsystemmajrelease}",
ensure => "${package_version}-1.${pkg_os_suffix}${::operatingsystemmajrelease}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indicates that I have never tested this module on Fedora. Fail.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's a new platform, so that makes some sort of sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnduarte The specs need to be updated to test this behavior:

Failures:
  1) puppet_agent supported operating systems on fedora-22-x86_64 puppet_agent class without any parameters should contain Package[puppet-agent] with ensure => "1.2.5-1.el22"
     Failure/Error: it { is_expected.to contain_package('puppet-agent').with_ensure(yum_package_version) }
       expected that the catalogue would contain Package[puppet-agent] with ensure set to "1.2.5-1.el22" but it is set to "1.2.5-1.fedoraf22"
     # ./spec/classes/puppet_agent_spec.rb:126
  2) puppet_agent supported operating systems on fedora-22-x86_64 puppet_agent class without any parameters should contain Package[puppet-agent] with ensure => "1.2.5-1.el22"
     Failure/Error: it { is_expected.to contain_package('puppet-agent').with_ensure(yum_package_version) }
       expected that the catalogue would contain Package[puppet-agent] with ensure set to "1.2.5-1.el22" but it is set to "1.2.5-1.fedoraf22"

Once that is done, I'm 👍 on this PR.

@johnduarte
Copy link
Contributor Author

@highb specs updated and 🍏 in Travis.

Copy link
Contributor

@highb highb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay specs! :shipit:

@highb highb merged commit efa08b8 into puppetlabs:master Sep 16, 2016
@johnduarte johnduarte deleted the pe-17508-use-fedoraf-package-suffix branch September 20, 2016 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants