Make force_bottle an explicit installer mode
This commit is contained in:
parent
7b6fa8b7bb
commit
a96c1a2afc
@ -109,6 +109,7 @@ module Homebrew extend self
|
|||||||
fi.only_deps = ARGV.only_deps?
|
fi.only_deps = ARGV.only_deps?
|
||||||
fi.build_bottle = ARGV.build_bottle?
|
fi.build_bottle = ARGV.build_bottle?
|
||||||
fi.build_from_source = ARGV.build_from_source?
|
fi.build_from_source = ARGV.build_from_source?
|
||||||
|
fi.force_bottle = ARGV.force_bottle?
|
||||||
fi.prelude
|
fi.prelude
|
||||||
fi.install
|
fi.install
|
||||||
fi.caveats
|
fi.caveats
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class FormulaInstaller
|
|||||||
attr_reader :f
|
attr_reader :f
|
||||||
attr_accessor :options, :ignore_deps, :only_deps
|
attr_accessor :options, :ignore_deps, :only_deps
|
||||||
attr_accessor :show_summary_heading, :show_header
|
attr_accessor :show_summary_heading, :show_header
|
||||||
attr_accessor :build_from_source, :build_bottle
|
attr_accessor :build_from_source, :build_bottle, :force_bottle
|
||||||
|
|
||||||
def initialize ff
|
def initialize ff
|
||||||
@f = ff
|
@f = ff
|
||||||
@ -27,6 +27,7 @@ class FormulaInstaller
|
|||||||
@only_deps = false
|
@only_deps = false
|
||||||
@build_from_source = false
|
@build_from_source = false
|
||||||
@build_bottle = false
|
@build_bottle = false
|
||||||
|
@force_bottle = false
|
||||||
@options = Options.new
|
@options = Options.new
|
||||||
|
|
||||||
@@attempted ||= Set.new
|
@@attempted ||= Set.new
|
||||||
@ -37,11 +38,11 @@ class FormulaInstaller
|
|||||||
|
|
||||||
def pour_bottle? install_bottle_options={:warn=>false}
|
def pour_bottle? install_bottle_options={:warn=>false}
|
||||||
return false if @pour_failed
|
return false if @pour_failed
|
||||||
|
return true if force_bottle && f.bottle
|
||||||
return false if build_from_source || build_bottle
|
return false if build_from_source || build_bottle
|
||||||
return false unless options.empty?
|
return false unless options.empty?
|
||||||
|
|
||||||
return true if f.local_bottle_path
|
return true if f.local_bottle_path
|
||||||
return true if ARGV.force_bottle?
|
|
||||||
return false unless f.bottle && f.pour_bottle?
|
return false unless f.bottle && f.pour_bottle?
|
||||||
|
|
||||||
unless f.bottle.compatible_cellar?
|
unless f.bottle.compatible_cellar?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user