sous-chefs/mingw

This cookbook fails to install on Chef 14 and 15

Closed this issue · 2 comments

Cookbook version

v2.1.0

Chef-client version

Chef Client 14.15.6 and 15.9.17

Platform Details

Windows2016 running in Vagrant.

Scenario:

I would like to get the core msys2 developer tools in C:\msys2

Steps to Reproduce:

include_recipe 'mingw::default'

msys2_package 'base-devel' do
  root 'C:\msys2'
end

Expected Result:

I am expecting the core msys2 developer tools to be installed in C:\msys2

Actual Result:

           ================================================================================
           Error executing action `install` on resource 'msys2_package[base-devel]'
           ================================================================================
           
           NoMethodError
           -------------
           undefined method `downcase' for nil:NilClass
           
           Cookbook Trace:
           ---------------
           C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/mingw/resources/msys2_package.rb:125:in `block in class_from_file'
           
           Resource Declaration:
           ---------------------
           # In C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/vulcan-builder/recipes/default.rb
           
            33: msys2_package 'base-devel' do
            34:   root 'C:\msys2'
            35: end
            36: 
           
           Compiled Resource:
           ------------------
           # Declared in C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/vulcan-builder/recipes/default.rb:33:in `from_file'
           
           msys2_package("base-devel") do
             action [:install]
             default_guard_interpreter :default
             declared_type :msys2_package
             cookbook_name "vulcan-builder"
             recipe_name "default"
             root "C:\\msys2"
             package "base-devel"
           end
           
           System Info:
           ------------
           chef_version=15.9.17
           platform=windows
           platform_version=10.0.14393
           ruby=ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
           program_name=C:/opscode/chef/bin/chef-client
           executable=C:/opscode/chef/bin/chef-client
           
       
       Running handlers:
       [2020-04-15T12:53:44+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2020-04-15T12:53:44+00:00] ERROR: Exception handlers complete
       Chef Infra Client failed. 21 resources updated in 08 minutes 34 seconds
       [2020-04-15T12:53:44+00:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
       [2020-04-15T12:53:44+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2020-04-15T12:53:44+00:00] FATAL: NoMethodError: msys2_package[base-devel] (vulcan-builder::default line 33) had an error: NoMethodError: undefined method `downcase' for nil:NilClass

Stacktrace from Chef 15.9.17 C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out

Generated at 2020-04-15 12:53:44 +0000
NoMethodError: msys2_package[base-devel] (vulcan-builder::default line 33) had an error: NoMethodError: undefined method `downcase' for nil:NilClass
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource/windows_package.rb:41:in `initialize'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_builder.rb:46:in `new'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_builder.rb:46:in `build'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/dsl/declare_resource.rb:316:in `build_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/dsl/declare_resource.rb:273:in `declare_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/dsl/resources.rb:36:in `package'
C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/mingw/resources/msys2_package.rb:125:in `block in class_from_file'
(eval):2:in `block in action_install'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/provider.rb:245:in `instance_eval'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/provider.rb:245:in `compile_and_converge_action'
(eval):2:in `action_install'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/provider.rb:189:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource.rb:586:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:74:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:108:in `block in run_all_actions'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:108:in `each'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:108:in `run_all_actions'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:132:in `block in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/resource_list.rb:96:in `block in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:115:in `call_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:86:in `step'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/resource_list.rb:94:in `execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/2.6.0/forwardable.rb:230:in `execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:130:in `converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:703:in `block in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:698:in `catch'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:698:in `converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:722:in `converge_and_save'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:288:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:320:in `run_with_graceful_exit_option'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:296:in `block in run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/local_mode.rb:42:in `with_server_connectivity'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:279:in `run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application/base.rb:330:in `run_application'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:68:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-bin-15.9.17/bin/chef-client:25:in `<top (required)>'
C:/opscode/chef/bin/chef-client:192:in `load'
C:/opscode/chef/bin/chef-client:192:in `<main>'

>>>> Caused by NoMethodError: undefined method `downcase' for nil:NilClass
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource/windows_package.rb:41:in `initialize'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_builder.rb:46:in `new'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_builder.rb:46:in `build'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/dsl/declare_resource.rb:316:in `build_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/dsl/declare_resource.rb:273:in `declare_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/dsl/resources.rb:36:in `package'
C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/mingw/resources/msys2_package.rb:125:in `block in class_from_file'
(eval):2:in `block in action_install'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/provider.rb:245:in `instance_eval'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/provider.rb:245:in `compile_and_converge_action'
(eval):2:in `action_install'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/provider.rb:189:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource.rb:586:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:74:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:108:in `block in run_all_actions'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:108:in `each'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:108:in `run_all_actions'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:132:in `block in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/resource_list.rb:96:in `block in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:115:in `call_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:86:in `step'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/resource_collection/resource_list.rb:94:in `execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/2.6.0/forwardable.rb:230:in `execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/runner.rb:130:in `converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:703:in `block in converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:698:in `catch'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:698:in `converge'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:722:in `converge_and_save'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/client.rb:288:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:320:in `run_with_graceful_exit_option'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:296:in `block in run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/local_mode.rb:42:in `with_server_connectivity'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:279:in `run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application/base.rb:330:in `run_application'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.9.17-universal-mingw32/lib/chef/application.rb:68:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-bin-15.9.17/bin/chef-client:25:in `<top (required)>'
C:/opscode/chef/bin/chef-client:192:in `load'
C:/opscode/chef/bin/chef-client:192:in `<main>'

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.