sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
202 stars 266 forks source link

6.1.0 removal of apt_update isn't actually in 6.1.0 supermarket code. #225

Closed et304383 closed 7 years ago

et304383 commented 7 years ago

Cookbook version

6.1.0

Chef-client version

12.5.1

Platform Details

Amazon Linux

Scenario:

Running chef-client

I think that the push of 6.1.0 to the supermarket didn't actually occur or occurred with old code. I am bringing in 6.1.0 and I still have libraries/apt_update.rb which was apparently removed.

I'm receiving the following error when running Chef:

================================================================================
Recipe Compile Error in /etc/chef/local-mode-cache/cache/cookbooks/apt/libraries/apt_update.rb
================================================================================

LoadError
---------
cannot load such file -- chef_compat/copied_from_chef/chef/dsl/declare_resource

Cookbook Trace:
---------------
  /etc/chef/local-mode-cache/cache/cookbooks/apt/libraries/apt_update.rb:2:in `<top (required)>'

Relevant File Content:
----------------------
/etc/chef/local-mode-cache/cache/cookbooks/apt/libraries/apt_update.rb:

  1:  unless defined? Chef::Resource::AptUpdate
  2>>   require 'chef_compat/copied_from_chef/chef/dsl/declare_resource'
  3:    require 'chef/mixin/shell_out'
  4:  
  5:    class AptUpdate < ChefCompat::Resource
  6:      include ChefCompat::CopiedFromChef::Chef::DSL::DeclareResource
  7:      include Chef::Mixin::ShellOut
  8:  
  9:      resource_name :apt_update
 10:  
 11:      provides :apt_update, os: 'linux'
tas50 commented 7 years ago

I think you might want to blow away that cached cookbook. I just pulled down the 6.1 artifact from the Supermarket and there isn't a file at apt/libraries/apt_update.rb. Seems like some sort of bad caching problem here.

et304383 commented 7 years ago

Apologies. My bootstrap script wasn't clearing out the existing directory first.

tas50 commented 7 years ago

No worries.