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

add an alias to the python-dev package #334

Merged
merged 7 commits into from
Apr 28, 2018

Conversation

dannygoulder
Copy link
Contributor

Allow other packages that require python-devel (e.g. on suse, redhat) to find the package in the catalog

Allow other packages that require python-devel (e.g. on suse, redhat) to find the package in the catalog
@ghoneycutt
Copy link
Member

This is failing due to style. Please use two spaces instead of a hard tab, also the arrows must be aligned.

I don't think that adding an alias that is the same as the name is going to help identify the package. You can already reference this package resource by the title 'python-dev' and not by whatever $pythondev is.

@dannygoulder
Copy link
Contributor Author

Sorry, looks like something went wrong with tab conversion (I confess, I forked and edited it in the browser for speed). Should have linted locally before submitting the PR. :(

I am using another module (dwerder/graphite) that requires the 'python-devel' package on RHEL/CentOS - and expects it to be named as such (which seems reasonable). Because the package resource is named 'python-dev' puppet complains that 'python-devel' isn't in the catalog. I can't add 'python-devel' either as the namevar seems to make it collide. Perhaps arguably a shortcoming in Puppet, as maybe Puppet should alias the package name automatically.

Adding the alias fixes the problem by ensuring that the package resource will always match the actual package name in any require. It also seems to be pretty free of side effects.

I'll clean up the PR and resubmit it.

On 4 Oct 2016, at 6:31 pm, Garrett Honeycutt [email protected] wrote:

This is failing due to style. Please use two spaces instead of a hard tab, also the arrows must be aligned.

I don't think that adding an alias that is the same as the name is going to help identify the package. You can already reference this package resource by the title 'python-dev' and not by whatever $pythondev is.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@ghoneycutt
Copy link
Member

Excellent, thank you!

Could you please update the spec tests to show the presence of this new attribute.

@dannygoulder
Copy link
Contributor Author

Sure, I'll try to get that done tomorrow. One thing I'm not sure about is whether adding an alias with the same name as the package will upset Puppet. Don't have a Debian-based box available to test it on though. Hopefully adding the tests will catch that one.

On 4 Oct 2016, at 10:12 pm, Garrett Honeycutt [email protected] wrote:

Excellent, thank you!

Could you please update the spec tests to show the presence of this new attribute.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dannygoulder
Copy link
Contributor Author

Just one thing to mention (I am just learning about spec tests so go easy on me :)). The spec tests are referencing Red Hat 5 (which is nearly EOL). Do you mind if I update that to 6 in the tests and update the PR? Or does it not really make much difference? Also just noticed that I missed adding the test for SuSe so I will add that too

@dannygoulder
Copy link
Contributor Author

Hmm looks like some incompatibility between a gem that got pulled in with rspec-puppet-facts and Ruby 1.8.7 causes those tests to fail. Newer ruby is working though. Might need some help with that... let me dig for a bit longer as I can use RHEL 6 ruby to fiddle.

@dannygoulder
Copy link
Contributor Author

Hi! I abandoned the rspec-puppet-facts idea and I've rebased to master.

@stankevich stankevich merged commit 7ce1729 into voxpupuli:master Apr 28, 2018
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.

3 participants