summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-04-07 23:37:55 -0700
committerDaniel DeLeo <dan@opscode.com>2011-04-07 23:37:55 -0700
commit80f97bc6f1ba22b9d107f10d477899d499a28364 (patch)
tree0e47187a5e963f030c30af334508c90c99a0700f
parent024a8cead2e8b70b315d99559b9f8e7f17fd09ab (diff)
parent8a019bf992dd1f483db2d1cf82612ba262fbfaa2 (diff)
downloadchef-80f97bc6f1ba22b9d107f10d477899d499a28364.tar.gz
Merge branch 'CHEF-2198'
-rw-r--r--chef/lib/chef/knife/cookbook_upload.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/chef/lib/chef/knife/cookbook_upload.rb b/chef/lib/chef/knife/cookbook_upload.rb
index e7e8e1dcc0..bafe3cc2c8 100644
--- a/chef/lib/chef/knife/cookbook_upload.rb
+++ b/chef/lib/chef/knife/cookbook_upload.rb
@@ -150,7 +150,10 @@ class Chef
# if only you people wouldn't put broken symlinks in your cookbooks in
# the first place. ;)
def check_for_broken_links(cookbook)
- broken_files = cookbook.manifest_records_by_path.select do |path, info|
+ # MUST!! dup the cookbook version object--it memoizes its
+ # manifest object, but the manifest becomes invalid when you
+ # regenerate the metadata
+ broken_files = cookbook.dup.manifest_records_by_path.select do |path, info|
info[CHECKSUM].nil? || info[CHECKSUM] !~ MATCH_CHECKSUM
end
unless broken_files.empty?