diff options
| author | Jack Nagel | 2012-12-17 17:05:53 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-12-17 17:18:22 -0600 |
| commit | 3dcce70a6af0a187f6c30e66cef45bee3cae6a6f (patch) | |
| tree | 5ff5af6efba3b34be927cb62b54be2cfedd90eb3 /Library/Homebrew/cmd | |
| parent | 68d1dfe5d77781e74cab72f0950484ae58d5e425 (diff) | |
| download | brew-3dcce70a6af0a187f6c30e66cef45bee3cae6a6f.tar.bz2 | |
Better reporting for MacPorts/Fink installations
closes Homebrew/homebrew#15853.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/--config.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb index 342d837f0..ac113c885 100644 --- a/Library/Homebrew/cmd/--config.rb +++ b/Library/Homebrew/cmd/--config.rb @@ -85,6 +85,11 @@ module Homebrew extend self `uname -m`.chomp end + def macports_or_fink + @ponk ||= MacOS.macports_or_fink + @ponk.join(", ") unless @ponk.empty? + end + # we try to keep output minimal def dump_build_config puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}" @@ -104,8 +109,7 @@ module Homebrew extend self puts "Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}" end - ponk = macports_or_fink_installed? - puts "MacPorts/Fink: #{ponk}" if ponk + puts "MacPorts/Fink: #{macports_or_fink}" if macports_or_fink puts "X11: #{describe_x11}" end @@ -131,8 +135,7 @@ module Homebrew extend self puts "GCC-4.2: build #{gcc_42}" if gcc_42 puts "LLVM-GCC: #{llvm ? "build #{llvm}" : "N/A"}" puts "Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}" - ponk = macports_or_fink_installed? - puts "MacPorts or Fink? #{ponk}" if ponk + puts "MacPorts/Fink: #{macports_or_fink}" if macports_or_fink puts "X11: #{describe_x11}" puts "System Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}" puts "Perl: #{describe_perl}" diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 79091b7db..fc8b637ba 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -184,11 +184,14 @@ def check_for_stray_las end def check_for_other_package_managers - if macports_or_fink_installed? + ponk = MacOS.macports_or_fink + unless ponk.empty? <<-EOS.undent - You have Macports or Fink installed. - This can cause trouble. You don't have to uninstall them, but you may like to - try temporarily moving them away, eg. + You have MacPorts or Fink installed: + #{ponk.join(", ")} + + This can cause trouble. You don't have to uninstall them, but you may want to + temporarily move them out of the way, e.g. sudo mv /opt/local ~/macports EOS diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index ad5420df1..34114e4ae 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -49,7 +49,7 @@ module Homebrew extend self end def check_macports - if MacOS.macports_or_fink_installed? + unless MacOS.macports_or_fink.empty? opoo "It appears you have MacPorts or Fink installed." puts "Software installed with other package managers causes known problems for" puts "Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again." |
