Format debug messages with odebug
This commit is contained in:
parent
fcdda8d481
commit
9bfd597991
@ -111,7 +111,7 @@ class Cleaner
|
|||||||
end
|
end
|
||||||
if ARGV.debug?
|
if ARGV.debug?
|
||||||
old_perms = path.stat.mode & 0777
|
old_perms = path.stat.mode & 0777
|
||||||
puts "Fixing #{path} permissions from #{old_perms.to_s(8)} to #{perms.to_s(8)}" if perms != old_perms
|
odebug "Fixing #{path} permissions from #{old_perms.to_s(8)} to #{perms.to_s(8)}" if perms != old_perms
|
||||||
end
|
end
|
||||||
path.chmod perms
|
path.chmod perms
|
||||||
end
|
end
|
||||||
|
|||||||
@ -50,7 +50,7 @@ module Homebrew
|
|||||||
|
|
||||||
first_warning = true
|
first_warning = true
|
||||||
methods.each do |method|
|
methods.each do |method|
|
||||||
$stderr.puts "Checking #{method}" if args.debug?
|
$stderr.puts Formatter.headline("Checking #{method}", color: :magenta) if args.debug?
|
||||||
unless checks.respond_to?(method)
|
unless checks.respond_to?(method)
|
||||||
Homebrew.failed = true
|
Homebrew.failed = true
|
||||||
puts "No check available by the name: #{method}"
|
puts "No check available by the name: #{method}"
|
||||||
|
|||||||
@ -135,14 +135,14 @@ module Homebrew
|
|||||||
file = repo/path
|
file = repo/path
|
||||||
result = Git.last_revision_of_file(repo, file, before_commit: rev)
|
result = Git.last_revision_of_file(repo, file, before_commit: rev)
|
||||||
if result.empty?
|
if result.empty?
|
||||||
ohai "Skipping revision #{rev} - file is empty at this revision" if ARGV.debug?
|
odebug "Skipping revision #{rev} - file is empty at this revision" if ARGV.debug?
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
test_formula = formula_at_revision(repo, name, file, rev)
|
test_formula = formula_at_revision(repo, name, file, rev)
|
||||||
break if test_formula.nil? || test_formula.version == version
|
break if test_formula.nil? || test_formula.version == version
|
||||||
|
|
||||||
ohai "Trying #{test_formula.version} from revision #{rev} against desired #{version}" if ARGV.debug?
|
odebug "Trying #{test_formula.version} from revision #{rev} against desired #{version}" if ARGV.debug?
|
||||||
end
|
end
|
||||||
odie "Could not find #{name}! The formula or version may not have existed." if test_formula.nil?
|
odie "Could not find #{name}! The formula or version may not have existed." if test_formula.nil?
|
||||||
else
|
else
|
||||||
@ -181,7 +181,7 @@ module Homebrew
|
|||||||
brew extract --force --version=#{version} #{name} #{destination_tap.name}
|
brew extract --force --version=#{version} #{name} #{destination_tap.name}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
ohai "Overwriting existing formula at #{path}" if ARGV.debug?
|
odebug "Overwriting existing formula at #{path}" if ARGV.debug?
|
||||||
path.delete
|
path.delete
|
||||||
end
|
end
|
||||||
ohai "Writing formula for #{name} from revision #{rev} to #{path}"
|
ohai "Writing formula for #{name} from revision #{rev} to #{path}"
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class FormulaVersions
|
|||||||
rescue *IGNORED_EXCEPTIONS => e
|
rescue *IGNORED_EXCEPTIONS => e
|
||||||
# We rescue these so that we can skip bad versions and
|
# We rescue these so that we can skip bad versions and
|
||||||
# continue walking the history
|
# continue walking the history
|
||||||
ohai "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
odebug "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
nil
|
nil
|
||||||
ensure
|
ensure
|
||||||
|
|||||||
@ -5,7 +5,7 @@ class Keg
|
|||||||
return if file.dylib_id == id
|
return if file.dylib_id == id
|
||||||
|
|
||||||
@require_relocation = true
|
@require_relocation = true
|
||||||
puts "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug?
|
odebug "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug?
|
||||||
MachO::Tools.change_dylib_id(file, id, strict: false)
|
MachO::Tools.change_dylib_id(file, id, strict: false)
|
||||||
rescue MachO::MachOError
|
rescue MachO::MachOError
|
||||||
onoe <<~EOS
|
onoe <<~EOS
|
||||||
@ -20,7 +20,7 @@ class Keg
|
|||||||
return if old == new
|
return if old == new
|
||||||
|
|
||||||
@require_relocation = true
|
@require_relocation = true
|
||||||
puts "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug?
|
odebug "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug?
|
||||||
MachO::Tools.change_install_name(file, old, new, strict: false)
|
MachO::Tools.change_install_name(file, old, new, strict: false)
|
||||||
rescue MachO::MachOError
|
rescue MachO::MachOError
|
||||||
onoe <<~EOS
|
onoe <<~EOS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user