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.
This commit is contained in:
Charlie Sharpsteen 2011-11-21 11:26:05 -08:00
parent 31eba09830
commit 39b3ed3c33

View File

@ -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?