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

execute[apt-cache gencaches] cannot be found in the resource collection #205

Closed manuelmazzuola closed 8 years ago

manuelmazzuola commented 8 years ago

Cookbook version

2.7.0

Chef-client version

chef-solo 12.6.0

Platform Details

Description:    Ubuntu 14.04.2 LTS
Linux test-cd-base 3.16.0-31-generic #43~14.04.1-Ubuntu SMP Tue Mar 10 20:13:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
GCE

Scenario:

# Install libsigar
  apt_repository 'libsigar' do
    action        :add
    uri        'myrepo'
    distribution  node['lsb']['codename']
    components    [ 'main' ]
    keyserver     'keyserver.ubuntu.com'
    key           'AKSLDASLD'
  end

Actual Result

 ================================================================================
           Error executing action `add` on resource 'apt_repository[libsigar]'
           ================================================================================

           Chef::Exceptions::ResourceNotFound
           ----------------------------------
           resource execute[apt-get update] is configured to notify resource execute[apt-cache gencaches] with action run, but execute[apt-cache gencaches] cannot be found in the resource collection. execute[apt
-get update] is defined in /tmp/kitchen/cookbooks/apt/providers/repository.rb:156:in `block in class_from_file'

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb:45:in `find_local'
           /tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb:58:in `find'
           /tmp/kitchen/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
vipulsharma21 commented 8 years ago

facing same issue....

jaredstehler commented 8 years ago

seems compat_resource was released yesterday with breaking changes. 12.9.1 works for me, 12.10.1 gives me this error.

vipulsharma21 commented 8 years ago

Yeah...Tested the above...Locked to earlier version

thommay commented 8 years ago

@lamont-granquist

manuelmazzuola commented 8 years ago

@jaredstehler thanks

lamont-granquist commented 8 years ago

closing as a dup of chef-cookbooks/compat_resource#54