-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Update version validation #472
Conversation
Hi @bodgit, thanks for the PR. Can you add some tests so we know that the issue is actually fixed? |
Move SCL checks to the EL6/7 contexts as EL5 is neither tested against nor does it support SCL repositories.
@bastelfreak Fixed. I noticed a few problems with the tests:
The tests now fail for on master and are fixed on this branch, so they're in a better state than they were. |
manifests/init.pp
Outdated
@@ -29,7 +29,7 @@ | |||
# @example install python3 from scl repo | |||
# class { 'python' : | |||
# ensure => 'present', | |||
# version => 'rh-python36-python', | |||
# version => 'rh-python36', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhm, is -python
not valid anymore? That would be a backwards-incompatible change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either work to install the runtime as both packages basically require each other, but as I mentioned in #471 if you specify the version as rh-python36-python
and elect to install the dev package, it will try and install rh-python36-python-scldevel
which doesn't exist, yet rh-python36-scldevel
does exist.
The original code has clearly been written with using rh-python36
as the version as there is a commented out block that would have installed ${version}-python-virtualenv
which would also error if you tried to use rh-python36-python
for the version, (too many -python-
's). It's been commented out as the rh-python36
package will pull this in as a dependency, but rh-python36-python
will not.
I'll update the regex so it doesn't break existing users but personally I think it needs a bit of work in the future; arguably the version should actually be rh-python36-python
and the dev option should install rh-python36-python-devel
rather than rh-python36-scldevel
, and rh-python36-python-virtualenv
should be explicitly installed rather than be commented out like it is currently.
For reference, these are the "core" packages that are available for the 3.6 software collection:
rh-python36.x86_64 : Package that installs rh-python36
rh-python36-runtime.x86_64 : Package that handles rh-python36 Software Collection.
rh-python36-scldevel.x86_64 : Package shipping development files for rh-python36
rh-python36-python.x86_64 : Version 3 of the Python programming language aka Python 3000
rh-python36-python-debug.x86_64 : Debug version of the Python 3 runtime
rh-python36-python-devel.x86_64 : Libraries and header files needed for Python 3 development
rh-python36-python-setuptools.noarch : Easily build and distribute Python packages
rh-python36-python-virtualenv.noarch : Tool to create isolated Python environments
rh-python36-python-wheel.noarch : A built-package format for Python
Allows the python3_version fact to be bypassed fully.
Thanks @bodgit ! |
Pull Request (PR) description
Update the version parameter validation to accept SCL-style Python versions, i.e. rh-python36
This Pull Request (PR) fixes the following issues
Fixes #471
Fixes #475