remove Formula#file_modified?
It's been more trouble than it's worth. Fixes Homebrew/homebrew#43607. Closes Homebrew/homebrew#43049. Closes Homebrew/homebrew#43615. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
488aa19d8f
commit
818c65542d
@ -33,13 +33,6 @@ module Homebrew
|
||||
return true if ARGV.force_bottle? && f.bottle
|
||||
return false unless f.bottle && f.pour_bottle?
|
||||
return false if ARGV.build_from_source? || ARGV.build_bottle?
|
||||
if f.file_modified?
|
||||
filename = f.path.to_s.gsub("#{HOMEBREW_PREFIX}/", "")
|
||||
opoo "Formula file is modified!"
|
||||
puts "Fetching source because #{filename} has local changes"
|
||||
puts "To fetch the bottle instead, run with --force-bottle"
|
||||
return false
|
||||
end
|
||||
return false unless f.bottle.compatible_cellar?
|
||||
true
|
||||
end
|
||||
|
||||
@ -916,16 +916,6 @@ class Formula
|
||||
"#<Formula #{name} (#{active_spec_sym}) #{path}>"
|
||||
end
|
||||
|
||||
# @private
|
||||
def file_modified?
|
||||
return false unless Utils.git_available?
|
||||
|
||||
path.parent.cd do
|
||||
diff = Utils.popen_read("git", "diff", "origin/master", "--", "#{path}")
|
||||
!diff.empty? && $?.exitstatus == 0
|
||||
end
|
||||
end
|
||||
|
||||
# Standard parameters for CMake builds.
|
||||
# Setting CMAKE_FIND_FRAMEWORK to "LAST" tells CMake to search for our
|
||||
# libraries before trying to utilize Frameworks, many of which will be from
|
||||
|
||||
@ -75,7 +75,6 @@ class FormulaInstaller
|
||||
return false if build_from_source? || build_bottle? || interactive?
|
||||
return false unless options.empty?
|
||||
return true if formula.local_bottle_path
|
||||
return false if formula.file_modified?
|
||||
return false unless bottle && formula.pour_bottle?
|
||||
|
||||
unless bottle.compatible_cellar?
|
||||
@ -199,12 +198,6 @@ class FormulaInstaller
|
||||
build_bottle_preinstall if build_bottle?
|
||||
|
||||
unless @poured_bottle
|
||||
if formula.file_modified? && !build_from_source?
|
||||
filename = formula.path.to_s.gsub("#{HOMEBREW_PREFIX}/", "")
|
||||
opoo "Formula file is modified!"
|
||||
puts "Building from source because #{filename} has local changes"
|
||||
puts "To install from a bottle instead, run with --force-bottle"
|
||||
end
|
||||
compute_and_install_dependencies if @pour_failed && !ignore_deps?
|
||||
build
|
||||
clean
|
||||
|
||||
@ -10,8 +10,6 @@ class BottleHookTests < Homebrew::TestCase
|
||||
def some_random_method
|
||||
true
|
||||
end
|
||||
|
||||
def file_modified?; end
|
||||
end
|
||||
|
||||
def setup
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user