Make FormulaInstaller setup more readable
This commit is contained in:
parent
ce5e2aa65c
commit
3b68723fa8
@ -104,17 +104,17 @@ module Homebrew extend self
|
||||
|
||||
def install_formula f
|
||||
fi = FormulaInstaller.new(f)
|
||||
fi.options = f.build.used_options
|
||||
fi.ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
|
||||
fi.only_deps = ARGV.only_deps?
|
||||
fi.build_bottle = ARGV.build_bottle?
|
||||
fi.build_from_source = ARGV.build_from_source?
|
||||
fi.force_bottle = ARGV.force_bottle?
|
||||
fi.interactive = ARGV.interactive?
|
||||
fi.interactive &&= :git if ARGV.flag? "--git"
|
||||
fi.verbose = ARGV.verbose?
|
||||
fi.verbose &&= :quieter if ARGV.quieter?
|
||||
fi.debug = ARGV.debug?
|
||||
fi.options = f.build.used_options
|
||||
fi.ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
|
||||
fi.only_deps = ARGV.only_deps?
|
||||
fi.build_bottle = ARGV.build_bottle?
|
||||
fi.build_from_source = ARGV.build_from_source?
|
||||
fi.force_bottle = ARGV.force_bottle?
|
||||
fi.interactive = ARGV.interactive?
|
||||
fi.interactive &&= :git if ARGV.flag? "--git"
|
||||
fi.verbose = ARGV.verbose?
|
||||
fi.verbose &&= :quieter if ARGV.quieter?
|
||||
fi.debug = ARGV.debug?
|
||||
fi.prelude
|
||||
fi.install
|
||||
fi.caveats
|
||||
|
||||
@ -56,13 +56,13 @@ module Homebrew extend self
|
||||
def upgrade_formula f
|
||||
outdated_keg = Keg.new(f.linked_keg.realpath) rescue nil
|
||||
|
||||
installer = FormulaInstaller.new(f)
|
||||
installer.options |= Tab.for_formula(f).used_options
|
||||
installer.build_from_source = ARGV.build_from_source?
|
||||
installer.verbose = ARGV.verbose?
|
||||
installer.verbose &&= :quieter if ARGV.quieter?
|
||||
installer.debug = ARGV.debug?
|
||||
installer.prelude
|
||||
fi = FormulaInstaller.new(f)
|
||||
fi.options = Tab.for_formula(f).used_options
|
||||
fi.build_from_source = ARGV.build_from_source?
|
||||
fi.verbose = ARGV.verbose?
|
||||
fi.verbose &&= :quieter if ARGV.quieter?
|
||||
fi.debug = ARGV.debug?
|
||||
fi.prelude
|
||||
|
||||
oh1 "Upgrading #{f.name}"
|
||||
|
||||
@ -71,9 +71,9 @@ module Homebrew extend self
|
||||
# do! Seriously, it happens!
|
||||
outdated_keg.unlink if outdated_keg
|
||||
|
||||
installer.install
|
||||
installer.caveats
|
||||
installer.finish
|
||||
fi.install
|
||||
fi.caveats
|
||||
fi.finish
|
||||
|
||||
# If the formula was pinned, and we were force-upgrading it, unpin and
|
||||
# pin it again to get a symlink pointing to the correct keg.
|
||||
|
||||
@ -341,13 +341,13 @@ class FormulaInstaller
|
||||
outdated_keg = Keg.new(df.linked_keg.realpath) rescue nil
|
||||
|
||||
fi = FormulaInstaller.new(df)
|
||||
fi.options |= Tab.for_formula(df).used_options
|
||||
fi.options |= dep.options
|
||||
fi.options |= inherited_options
|
||||
fi.ignore_deps = true
|
||||
fi.build_from_source = build_from_source?
|
||||
fi.verbose = verbose? unless verbose == :quieter
|
||||
fi.debug = debug?
|
||||
fi.options |= Tab.for_formula(df).used_options
|
||||
fi.options |= dep.options
|
||||
fi.options |= inherited_options
|
||||
fi.ignore_deps = true
|
||||
fi.build_from_source = build_from_source?
|
||||
fi.verbose = verbose? unless verbose == :quieter
|
||||
fi.debug = debug?
|
||||
fi.prelude
|
||||
oh1 "Installing #{f} dependency: #{Tty.green}#{dep.name}#{Tty.reset}"
|
||||
outdated_keg.unlink if outdated_keg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user