Merge pull request #7635 from MikeMcQuaid/prelude-before-fetch
formula_installer: prelude before fetch.
This commit is contained in:
		
						commit
						4e67b212d7
					
				@ -368,8 +368,8 @@ module Cask
 | 
			
		||||
            fi.installed_on_request = false
 | 
			
		||||
            fi.show_header = true
 | 
			
		||||
            fi.verbose = verbose?
 | 
			
		||||
            fi.fetch
 | 
			
		||||
            fi.prelude
 | 
			
		||||
            fi.fetch
 | 
			
		||||
            fi.install
 | 
			
		||||
            fi.finish
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
@ -325,8 +325,8 @@ module Homebrew
 | 
			
		||||
    fi.build_bottle         = args.build_bottle?
 | 
			
		||||
    fi.interactive          = args.interactive?
 | 
			
		||||
    fi.git                  = args.git?
 | 
			
		||||
    fi.fetch
 | 
			
		||||
    fi.prelude
 | 
			
		||||
    fi.fetch
 | 
			
		||||
    fi.install
 | 
			
		||||
    fi.finish
 | 
			
		||||
  rescue FormulaInstallationAlreadyAttemptedError
 | 
			
		||||
 | 
			
		||||
@ -191,8 +191,8 @@ module Homebrew
 | 
			
		||||
    end
 | 
			
		||||
    oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{upgrade_version} #{fi.options.to_a.join(" ")}"
 | 
			
		||||
 | 
			
		||||
    fi.fetch
 | 
			
		||||
    fi.prelude
 | 
			
		||||
    fi.fetch
 | 
			
		||||
 | 
			
		||||
    # first we unlink the currently active keg for this formula otherwise it is
 | 
			
		||||
    # possible for the existing build to interfere with the build we are about to
 | 
			
		||||
 | 
			
		||||
@ -141,7 +141,6 @@ class FormulaInstaller
 | 
			
		||||
  def prelude
 | 
			
		||||
    Tab.clear_cache
 | 
			
		||||
    verify_deps_exist unless ignore_deps?
 | 
			
		||||
    lock
 | 
			
		||||
    check_install_sanity
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -221,6 +220,8 @@ class FormulaInstaller
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def install
 | 
			
		||||
    lock
 | 
			
		||||
 | 
			
		||||
    start_time = Time.now
 | 
			
		||||
    if !formula.bottle_unneeded? && !pour_bottle? && DevelopmentTools.installed?
 | 
			
		||||
      Homebrew::Install.perform_build_from_source_checks
 | 
			
		||||
@ -969,9 +970,10 @@ class FormulaInstaller
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def fetch_dependencies
 | 
			
		||||
    deps = compute_dependencies
 | 
			
		||||
    return if ignore_deps?
 | 
			
		||||
 | 
			
		||||
    return if deps.empty? || ignore_deps?
 | 
			
		||||
    deps = compute_dependencies
 | 
			
		||||
    return if deps.empty?
 | 
			
		||||
 | 
			
		||||
    deps.each { |dep, _options| fetch_dependency(dep) }
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -35,8 +35,8 @@ module Homebrew
 | 
			
		||||
      fi.installed_as_dependency = tab.installed_as_dependency
 | 
			
		||||
      fi.installed_on_request    = tab.installed_on_request
 | 
			
		||||
    end
 | 
			
		||||
    fi.fetch
 | 
			
		||||
    fi.prelude
 | 
			
		||||
    fi.fetch
 | 
			
		||||
 | 
			
		||||
    oh1 "Reinstalling #{Formatter.identifier(f.full_name)} #{options.to_a.join " "}"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -176,8 +176,8 @@ RSpec.shared_context "integration test" do
 | 
			
		||||
    setup_test_formula(name, content)
 | 
			
		||||
    fi = FormulaInstaller.new(Formula[name])
 | 
			
		||||
    fi.build_bottle = build_bottle
 | 
			
		||||
    fi.fetch
 | 
			
		||||
    fi.prelude
 | 
			
		||||
    fi.fetch
 | 
			
		||||
    fi.install
 | 
			
		||||
    fi.finish
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user