diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-30 15:59:00 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-07-30 15:59:00 -0700 |
commit | 760fe11fb5cb13c27c2e83a6b3ea075de833cd20 (patch) | |
tree | 4eda84649dba9b86f049005a1e8ee38b5b24990e | |
parent | ccfa237afe8609dc34316c68de715c89240b9230 (diff) | |
download | chef-760fe11fb5cb13c27c2e83a6b3ea075de833cd20.tar.gz |
bypass idempotency in the cookbook_collection class
yo dawg, I put some idempotency in your idempotency because it heard you
really liked idempotency.
the file provider already handles this, the cookbook_collection does
not need to re-checksum the source to try to be idempotent, which is
what the last argument to the destination path does. here we just want
to lookup a file in the cookbook cache and fetch it if necessary and
return the path into the cache. the cookbook cache should not need
to know about where we're going to be deploying it.
as a side effect this avoids a second needless checksum.
-rw-r--r-- | lib/chef/provider/cookbook_file/content.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/cookbook_file/content.rb b/lib/chef/provider/cookbook_file/content.rb index cb777dd916..9f49ba885c 100644 --- a/lib/chef/provider/cookbook_file/content.rb +++ b/lib/chef/provider/cookbook_file/content.rb @@ -28,7 +28,7 @@ class Chef def file_for_provider cookbook = run_context.cookbook_collection[resource_cookbook] - file_cache_location = cookbook.preferred_filename_on_disk_location(run_context.node, :files, @new_resource.source, @new_resource.path) + file_cache_location = cookbook.preferred_filename_on_disk_location(run_context.node, :files, @new_resource.source) if file_cache_location.nil? nil else |