diff options
| author | Jack Nagel | 2013-01-23 00:26:29 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2013-01-26 12:14:49 -0600 | 
| commit | 569231f14dd3a595ec28fa29df032fccedd80303 (patch) | |
| tree | 9d13687b13d82761d1f0347e635ae17aed957cf5 | |
| parent | 84d73f6afcdda9f039dc56ebe1f0ad9665c43d69 (diff) | |
| download | homebrew-569231f14dd3a595ec28fa29df032fccedd80303.tar.bz2 | |
upgrade: offload dependency expansion to FormulaInstaller
Now that FormulaInstaller does dependency expansion the _right_ way,
avoid duplicating the logic in upgrade. Instead, offload it to the
installer, which will generate an exception in check_install_sanity that
we can safely ignore when formulae in the outdated list are upgraded as
part of the dependency tree of another outdated formula.
| -rw-r--r-- | Library/Homebrew/cmd/upgrade.rb | 11 | 
1 files changed, 0 insertions, 11 deletions
| diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index f80a218eb..c63a535fe 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -32,17 +32,6 @@ module Homebrew extend self        exit 1 if outdated.empty?      end -    # Expand the outdated list to include outdated dependencies then sort and -    # reduce such that dependencies are installed first and installation is not -    # attempted twice. Sorting is implicit the way `recursive_deps` returns -    # root dependencies at the head of the list and `uniq` keeps the first -    # element it encounters and discards the rest. -    ARGV.filter_for_dependencies do -      outdated.map!{ |f| f.recursive_deps.reject{ |d| d.installed? } << f } -      outdated.flatten! -      outdated.uniq! -    end unless ARGV.ignore_deps? -      if outdated.length > 1        oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"        puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", " | 
