Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
explicitly list broken/missing cookbooks during extracts, with --nova…
Browse files Browse the repository at this point in the history
…lidation override
  • Loading branch information
mattray committed May 23, 2012
1 parent d052e21 commit 53e08c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -114,6 +114,10 @@ This is the current, previous and future development milestones and contains the
=====
* fixed issue in cookbook dependency sorting

1.1.2
=====
* explicitly list broken/missing cookbooks during extracts, with --novalidation override

BACKLOG
=======
1.2
Expand Down
16 changes: 10 additions & 6 deletions lib/spiceweasel/directory_extractor.rb
Expand Up @@ -106,12 +106,16 @@ def self.order_cookbooks_by_dependency(cookbooks)
end
if scount > 0
remainders = unsorted_cookbooks.collect {|x| x['name']}
deps = unsorted_cookbooks.collect {|x| x['dependencies'].collect {|x| x['cookbook']}}
STDERR.puts "ERROR: Dependencies not satisfied or circular dependencies in cookbook(s): #{remainders} depend(s) on #{deps}"
exit(-1)
else
#hack to get the format same as yaml/json parse
return sorted_cookbooks.collect {|x| {x => nil} }
STDOUT.puts "DEBUG: dir_ext: remainders: '#{remainders}'" if DEBUG
if NOVALIDATION #stuff is missing, oh well
sorted_cookbooks.push(remainders).flatten!
else
deps = unsorted_cookbooks.collect {|x| x['dependencies'].collect {|x| x['cookbook']} - sorted_cookbooks}
STDERR.puts "ERROR: Dependencies not satisfied or circular dependencies in cookbook(s): #{remainders} depend(s) on #{deps}"
exit(-1)
end
end
#hack to get the format same as yaml/json parse
return sorted_cookbooks.collect {|x| {x => nil} }
end
end
2 changes: 1 addition & 1 deletion lib/spiceweasel/version.rb
Expand Up @@ -17,5 +17,5 @@
#

module Spiceweasel
VERSION = "1.1.1"
VERSION = "1.1.2"
end

0 comments on commit 53e08c9

Please sign in to comment.