🗣️ Foreword
When I use the cpan_module resource requesting a specific version of a package, the first convergence run succeeds, but on subsequent runs, an error is thrown. An example resource block that would trigger this issue on an example run:
cpan_module 'Cpanel::JSON::XS' do
version '==3.23.900'
end
👻 Brief Description
FATAL: NameError: cpan_module[Cpanel::JSON::XS] (vmasterConvoso::perl line 46) had an error: NameError: execute[CPAN :install Cpanel::JSON::XS] (/tmp/kitchen/cache/cookbooks/perl/resources/cpan_module.rb line 10) had an error: NameError: undefined method `==3.23.900' for class `Gem::Version'
🥞 Cookbook version
Version of the cookbook where you are encountering the issue.
7.1.2
👩🍳 Chef-Infra Version
Version of chef-client in your environment.
17.6.18
🎩 Platform details
Ubuntu 20.04 LTS
Steps To Reproduce
Steps to reproduce the behavior:
Use the "cpan_module" resource with a specific hard-coded version of a package.
🚓 Expected behavior
The resource should not attempt to reinstall the package again if the package is already installed, and the resource should not fail.
🗣️ Foreword
When I use the
cpan_moduleresource requesting a specific version of a package, the first convergence run succeeds, but on subsequent runs, an error is thrown. An example resource block that would trigger this issue on an example run:👻 Brief Description
FATAL: NameError: cpan_module[Cpanel::JSON::XS] (vmasterConvoso::perl line 46) had an error: NameError: execute[CPAN :install Cpanel::JSON::XS] (/tmp/kitchen/cache/cookbooks/perl/resources/cpan_module.rb line 10) had an error: NameError: undefined method `==3.23.900' for class `Gem::Version'🥞 Cookbook version
Version of the cookbook where you are encountering the issue.
7.1.2👩🍳 Chef-Infra Version
Version of chef-client in your environment.
17.6.18
🎩 Platform details
Ubuntu 20.04 LTS
Steps To Reproduce
Steps to reproduce the behavior:
Use the "cpan_module" resource with a specific hard-coded version of a package.
🚓 Expected behavior
The resource should not attempt to reinstall the package again if the package is already installed, and the resource should not fail.