Skip to content

fix undefined constant issue#386

Draft
cohoe wants to merge 1 commit into
puppetlabs:mainfrom
cohoe:rangefix
Draft

fix undefined constant issue#386
cohoe wants to merge 1 commit into
puppetlabs:mainfrom
cohoe:rangefix

Conversation

@cohoe

@cohoe cohoe commented May 24, 2026

Copy link
Copy Markdown

Summary

When installing a package at a specific version such as:

package { "amd-ryzen-chipset":
  ensure => "2026.3.9"
}

I was getting the following error:

Error: Could not update: uninitialized constant VersionRange
Error: /Stage[main]/Profiles::Driver::Cpu::Ryzen/Package[amd-ryzen-chipset]/ensure: change from 'absent' to '2026.3.9' failed: Could not update: uninitialized constant VersionRange

Additional Context

Claude led me to the provider Ruby being faulty when not using :present or :absent.

This PR ensures that the constants are always defined. I have tested this on my Windows 11 host running provider 8.0.3 (with my patch). I have not tested this on anything else. Making this in draft mode only in case anyone else stumbles across this same issue.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants