Skip to content

Unable to use SCL version #471

@bodgit

Description

@bodgit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions