Make verbose an installer mode
This commit is contained in:
parent
908d2ba792
commit
4d02849d43
@ -112,6 +112,8 @@ module Homebrew extend self
|
|||||||
fi.force_bottle = ARGV.force_bottle?
|
fi.force_bottle = ARGV.force_bottle?
|
||||||
fi.interactive = ARGV.interactive?
|
fi.interactive = ARGV.interactive?
|
||||||
fi.interactive &&= :git if ARGV.flag? "--git"
|
fi.interactive &&= :git if ARGV.flag? "--git"
|
||||||
|
fi.verbose = ARGV.verbose?
|
||||||
|
fi.verbose &&= :quieter if ARGV.quieter?
|
||||||
fi.prelude
|
fi.prelude
|
||||||
fi.install
|
fi.install
|
||||||
fi.caveats
|
fi.caveats
|
||||||
|
|||||||
@ -59,6 +59,8 @@ module Homebrew extend self
|
|||||||
installer = FormulaInstaller.new(f)
|
installer = FormulaInstaller.new(f)
|
||||||
installer.options |= Tab.for_formula(f).used_options
|
installer.options |= Tab.for_formula(f).used_options
|
||||||
installer.build_from_source = ARGV.build_from_source?
|
installer.build_from_source = ARGV.build_from_source?
|
||||||
|
installer.verbose = ARGV.verbose?
|
||||||
|
installer.verbose &&= :quieter if ARGV.quieter?
|
||||||
installer.prelude
|
installer.prelude
|
||||||
|
|
||||||
oh1 "Upgrading #{f.name}"
|
oh1 "Upgrading #{f.name}"
|
||||||
|
|||||||
@ -187,7 +187,6 @@ module HomebrewArgvExtension
|
|||||||
--devel
|
--devel
|
||||||
--HEAD
|
--HEAD
|
||||||
]
|
]
|
||||||
flags_to_clear.concat %w[--verbose -v] if quieter?
|
|
||||||
flags_to_clear.each {|flag| delete flag}
|
flags_to_clear.each {|flag| delete flag}
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class FormulaInstaller
|
|||||||
mode_attr_accessor :show_summary_heading, :show_header
|
mode_attr_accessor :show_summary_heading, :show_header
|
||||||
mode_attr_accessor :build_from_source, :build_bottle, :force_bottle
|
mode_attr_accessor :build_from_source, :build_bottle, :force_bottle
|
||||||
mode_attr_accessor :ignore_deps, :only_deps, :interactive
|
mode_attr_accessor :ignore_deps, :only_deps, :interactive
|
||||||
|
mode_attr_accessor :verbose
|
||||||
|
|
||||||
def initialize ff
|
def initialize ff
|
||||||
@f = ff
|
@f = ff
|
||||||
@ -35,6 +36,7 @@ class FormulaInstaller
|
|||||||
@build_bottle = false
|
@build_bottle = false
|
||||||
@force_bottle = false
|
@force_bottle = false
|
||||||
@interactive = false
|
@interactive = false
|
||||||
|
@verbose = false
|
||||||
@options = Options.new
|
@options = Options.new
|
||||||
|
|
||||||
@@attempted ||= Set.new
|
@@attempted ||= Set.new
|
||||||
@ -343,6 +345,7 @@ class FormulaInstaller
|
|||||||
fi.options |= inherited_options
|
fi.options |= inherited_options
|
||||||
fi.ignore_deps = true
|
fi.ignore_deps = true
|
||||||
fi.build_from_source = build_from_source?
|
fi.build_from_source = build_from_source?
|
||||||
|
fi.verbose = verbose? unless verbose == :quieter
|
||||||
fi.prelude
|
fi.prelude
|
||||||
oh1 "Installing #{f} dependency: #{Tty.green}#{dep.name}#{Tty.reset}"
|
oh1 "Installing #{f} dependency: #{Tty.green}#{dep.name}#{Tty.reset}"
|
||||||
outdated_keg.unlink if outdated_keg
|
outdated_keg.unlink if outdated_keg
|
||||||
@ -376,7 +379,7 @@ class FormulaInstaller
|
|||||||
def finish
|
def finish
|
||||||
return if only_deps?
|
return if only_deps?
|
||||||
|
|
||||||
ohai 'Finishing up' if ARGV.verbose?
|
ohai 'Finishing up' if verbose?
|
||||||
|
|
||||||
install_plist
|
install_plist
|
||||||
|
|
||||||
@ -395,7 +398,7 @@ class FormulaInstaller
|
|||||||
|
|
||||||
post_install
|
post_install
|
||||||
|
|
||||||
ohai "Summary" if ARGV.verbose? or show_summary_heading?
|
ohai "Summary" if verbose? or show_summary_heading?
|
||||||
puts summary
|
puts summary
|
||||||
ensure
|
ensure
|
||||||
unlock if hold_locks?
|
unlock if hold_locks?
|
||||||
@ -431,7 +434,7 @@ class FormulaInstaller
|
|||||||
args << "--git" if interactive == :git
|
args << "--git" if interactive == :git
|
||||||
end
|
end
|
||||||
|
|
||||||
args << "--verbose" if ARGV.verbose?
|
args << "--verbose" if verbose?
|
||||||
args << "--debug" if ARGV.debug?
|
args << "--debug" if ARGV.debug?
|
||||||
args << "--cc=#{ARGV.cc}" if ARGV.cc
|
args << "--cc=#{ARGV.cc}" if ARGV.cc
|
||||||
args << "--env=#{ARGV.env}" if ARGV.env
|
args << "--env=#{ARGV.env}" if ARGV.env
|
||||||
@ -557,7 +560,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def clean
|
def clean
|
||||||
ohai "Cleaning" if ARGV.verbose?
|
ohai "Cleaning" if verbose?
|
||||||
Cleaner.new(f).clean
|
Cleaner.new(f).clean
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
opoo "The cleaning step did not complete successfully"
|
opoo "The cleaning step did not complete successfully"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user