From 39b3ed3c33a46c53f5836bc9c06479877cf10f6a Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Mon, 21 Nov 2011 11:26:05 -0800 Subject: [PATCH] formula_installer.rb: Hotfix for head installs For now, don't strip `--HEAD` from `ARGV` prior to forking for install. Currently this doesn't work because the formula object the installer is acting on has its `prefix` set while under the influence of `--HEAD`. So, the installer bails out when it sees that nothing is installed to `f.prefix`. This is a hotfix for issue Homebrew/homebrew#8668 to allow formulae to keep building. A proper fix should ensure that formula installers are operating on objects with appropriately set `prefix` values. --- Library/Homebrew/formula_installer.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 1a42504860..4590bf96c9 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -253,7 +253,7 @@ class FormulaInstaller # list. # # FIXME: - # `ARGV.formulae` probably should be throwing exceptions, it should be + # `ARGV.formulae` probably shouldn't be throwing exceptions, it should be # the caller's responsibility to check `ARGV.formulae.empty?`. return false if ARGV.named.empty? ARGV.formulae.include? f @@ -261,10 +261,14 @@ class FormulaInstaller args = ARGV.clone + # FIXME: Also need to remove `--HEAD`, however there is a problem in that + # the properties of formula objects, such as `prefix`, are influenced by + # `--HEAD` and get set when the object is created. + # + # See issue #8668 %w[ --debug -d --fresh - --HEAD --interactive -i --verbose -v ].each {|flag| args.delete flag} unless explicitly_requested?