puppet-python
puppet-python copied to clipboard
Discussion: should dev package be uninstalled by default?
I find it very surprising that the following code would uninstall the python-devel package:
include python
I believe there should be three possible outcomes of the dev parameter:
true⇒ ensure presentfalse⇒ ensure absentundef(default) ⇒ noop
agreed.
especially given how perfectly useless pip/virtualenv, etc… are without python-devel, i'd assume 'true' to be default.
I have no problem with true being the default
An additional reason for this is that, at least under Centos 7, python-virtualenv depends on python-devel so if you set virtualenv to true when you call the python class but don't set dev to true
- The first puppet run
- puppet sees that python-devel is not installed and so doesn't try to uninstall it
- puppet installs python-virtualenv which also installs python-devel as it is a dependency
- The second puppet run
- puppet sees that python-devel is installed and attempts to uninstall it
- this fails as it's a dependency of python-virtualenv
Let me know if the bug till exists.
@shivapoudel are you referring to some change which fixes this?
@gene1wood can you look for this :P
@faxm0dem I have reopened the issue, are you interested in PR for this fix.
Sure thing, does everyone agree that $dev = true be the default?
@faxm0dem for me its ok.
I think the cleanest solution would be the default behavior to neither install nor uninstall python-devel but just leave it as it is (unless it's a dependency for something like virtualenv).
However if this is complicated to implement or feels confusing (to default to noop), then ya, $dev = true sounds fine to me (can't think of an instance where someone would have a problem with install the devel package other than a system with very little disk space)
@shivapoudel Once there's a PR I can try removing my workaround code and see if the PR fixes this in Centos 7
I think the cleanest solution would be the default behavior to neither install nor uninstall python-devel but just leave it as it is (unless it's a dependency for something like virtualenv).
I agree with @gene1wood. I manage some very simple virtualenv which don't need python-dev installation. I prefer to keep it uninstalled.
Okay then, I'll queue this on my TODO