Skip to content
Browse files

explicitly list broken/missing cookbooks during extracts, with --nova…

…lidation override
  • Loading branch information...
1 parent d052e21 commit 53e08c92d0546701fb7267bb243a24c27884470b @mattray committed
Showing with 15 additions and 7 deletions.
  1. +4 −0 CHANGELOG.md
  2. +10 −6 lib/spiceweasel/directory_extractor.rb
  3. +1 −1 lib/spiceweasel/version.rb
View
4 CHANGELOG.md
@@ -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
View
16 lib/spiceweasel/directory_extractor.rb
@@ -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
View
2 lib/spiceweasel/version.rb
@@ -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.
Something went wrong with that request. Please try again.