From 1761ba66bfca0784d49de10bd684cc54d53fded8 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 3 Apr 2010 08:44:41 -0700 Subject: Failures during ./configure should mention config.log. --- Library/Homebrew/formula.rb | 6 ++++++ Library/Homebrew/global.rb | 7 ++++++- Library/Homebrew/test/configure_fails.tar.gz | Bin 0 -> 196 bytes Library/Homebrew/test/test_formula_install.rb | 12 ++++++++++++ Library/Homebrew/test/testball.rb | 15 +++++++++++++++ Library/Homebrew/test/testing_env.rb | 16 ++++++++++++++-- 6 files changed, 53 insertions(+), 3 deletions(-) create mode 100755 Library/Homebrew/test/configure_fails.tar.gz (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 284161853..2d25d248b 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -205,6 +205,12 @@ class Formula onoe e.inspect puts e.backtrace ohai "Rescuing build..." + if (e.was_running_configure? rescue false) and File.exist? 'config.log' + puts "It looks like an autotools configure failed." + puts "Gist 'config.log' and any error output when reporting an issue." + puts + end + puts "When you exit this shell Homebrew will attempt to finalise the installation." puts "If nothing is installed or the shell exits with a non-zero error code," puts "Homebrew will abort. The installation prefix is:" diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index cb889bbb3..06cca3859 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -44,13 +44,18 @@ RECOMMENDED_GCC_42 = (MACOS_VERSION >= 10.6) ? 5646 : 5577 class ExecutionError e + assert e.was_running_configure? + end + end +end + + class InstallTests < Test::Unit::TestCase def temporary_install f # Brew and install the given formula diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb index 6393342e5..58af9d2b7 100644 --- a/Library/Homebrew/test/testball.rb +++ b/Library/Homebrew/test/testball.rb @@ -12,3 +12,18 @@ class TestBall