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

Unable to use SCL version #471

Closed
bodgit opened this issue Apr 3, 2019 · 0 comments · Fixed by #472
Closed

Unable to use SCL version #471

bodgit opened this issue Apr 3, 2019 · 0 comments · Fixed by #472

Comments

@bodgit
Copy link
Contributor

bodgit commented Apr 3, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.x
  • Ruby:
  • Distribution: Red Hat
  • Module version: 2.2.3-rc0

How to reproduce (e.g Puppet code you use)

The following documented example doesn't work:

class { 'python' :
  ensure     => 'present',
  version    => 'rh-python36-python',
  dev        => 'present',
  virtualenv => 'present',
}

What are you seeing

This falls foul of the version validation:

version needs to be pypy, system or a version string like '3.5' or 'python3.5)

What behaviour did you expect instead

Should JFW

Output log

See above

Any additional information you'd like to impart

Previously in older versions of the module validate_re() was used along with the $valid_versions parameter however these patterns were not anchored so as long as $version contained a version number somewhere in the value, it would pass validation.

This example also won't work anyway with the validation fix, as the code will then try and install a rh-python36-python-scldevel package which doesn't exist, however there is a rh-python36-scldevel package. There's also a rh-python36-python-devel package which are the actual files to develop against Python, whereas the -scldevel package is for developing against the software collection itself. So I'm not sure the install class is pulling in the right package here anyway.

Simplest fix is to probably just update the regex with an additional pattern along the lines of /\Arh-python\d{2}(?:-python)?\Z/ and that covers both cases.

bodgit added a commit to aspectcapital/puppet-python that referenced this issue Apr 3, 2019
krissik pushed a commit to krissik/puppet-python that referenced this issue Jul 30, 2020
russellshackleford pushed a commit to russellshackleford/puppet-python that referenced this issue Sep 28, 2020
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 a pull request may close this issue.

1 participant