diff options
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_bottle_hooks.rb | 2 |
4 files changed, 0 insertions, 26 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 61c8bf781..ea642e6e9 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -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 diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 68649e785..7b3d0062e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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 diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index c997176f9..7395edc49 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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 diff --git a/Library/Homebrew/test/test_bottle_hooks.rb b/Library/Homebrew/test/test_bottle_hooks.rb index f2ae5a6b7..ff9d95c9c 100644 --- a/Library/Homebrew/test/test_bottle_hooks.rb +++ b/Library/Homebrew/test/test_bottle_hooks.rb @@ -10,8 +10,6 @@ class BottleHookTests < Homebrew::TestCase def some_random_method true end - - def file_modified?; end end def setup |
