Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formula_installer: prelude before fetch. #7635

Merged
merged 1 commit into from May 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/installer.rb
Expand Up @@ -368,8 +368,8 @@ def cask_and_formula_dependencies
fi.installed_on_request = false
fi.show_header = true
fi.verbose = verbose?
fi.fetch
fi.prelude
fi.fetch
fi.install
fi.finish
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/install.rb
Expand Up @@ -325,8 +325,8 @@ def install_formula(f)
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
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/upgrade.rb
Expand Up @@ -191,8 +191,8 @@ def upgrade_formula(f)
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
Expand Down
8 changes: 5 additions & 3 deletions Library/Homebrew/formula_installer.rb
Expand Up @@ -141,7 +141,6 @@ def install_bottle_for?(dep, build)
def prelude
Tab.clear_cache
verify_deps_exist unless ignore_deps?
lock
check_install_sanity
end

Expand Down Expand Up @@ -221,6 +220,8 @@ def build_bottle_postinstall
end

def install
lock

start_time = Time.now
if !formula.bottle_unneeded? && !pour_bottle? && DevelopmentTools.installed?
Homebrew::Install.perform_build_from_source_checks
Expand Down Expand Up @@ -969,9 +970,10 @@ def post_install
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
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/reinstall.rb
Expand Up @@ -35,8 +35,8 @@ def reinstall_formula(f, build_from_source: false)
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 " "}"

Expand Down
Expand Up @@ -176,8 +176,8 @@ def install_test_formula(name, content = nil, build_bottle: false)
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
Expand Down