lib/kcd/shelf.rb in knife_cookbook_dependencies-0.0.7 vs lib/kcd/shelf.rb in knife_cookbook_dependencies-0.0.8

- old
+ new

@@ -20,12 +20,17 @@ # all cookbooks in the Cookbookfile are dependencies of the shelf shelf = MetaCookbook.new(META_COOKBOOK_NAME, cookbooks_to_install) self.class.populate_graph graph, shelf + selector = DepSelector::Selector.new(graph) - solution = selector.find_solution([DepSelector::SolutionConstraint.new(graph.package(META_COOKBOOK_NAME))]) + + solution = quietly do + selector.find_solution([DepSelector::SolutionConstraint.new(graph.package(META_COOKBOOK_NAME))]) + end + solution.delete META_COOKBOOK_NAME solution end def write_lockfile @@ -36,10 +41,10 @@ @cookbooks.select { |c| c.name == name }.first end def populate_cookbooks_directory cookbooks_from_path = @cookbooks.select(&:from_path?) | @cookbooks.select(&:from_git?) - + KCD.ui.info "Fetching cookbooks:" resolve_dependencies.each_pair do |cookbook_name, version| cookbook = cookbooks_from_path.select { |c| c.name == cookbook_name }.first || Cookbook.new(cookbook_name, version.to_s) @cookbooks << cookbook cookbook.download cookbook.unpack