formula_installer: fix fetch deps and local pour for download queue.
This commit is contained in:
parent
d3a9525fd7
commit
0c09ed71d4
@ -320,6 +320,8 @@ class FormulaInstaller
|
|||||||
# Needs to be done before expand_dependencies for compute_dependencies
|
# Needs to be done before expand_dependencies for compute_dependencies
|
||||||
fetch_bottle_tab if pour_bottle?
|
fetch_bottle_tab if pour_bottle?
|
||||||
|
|
||||||
|
fetch_fetch_deps unless ignore_deps?
|
||||||
|
|
||||||
@ran_prelude_fetch = true
|
@ran_prelude_fetch = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -346,7 +348,9 @@ class FormulaInstaller
|
|||||||
forbidden_formula_check
|
forbidden_formula_check
|
||||||
|
|
||||||
check_install_sanity
|
check_install_sanity
|
||||||
install_fetch_deps unless ignore_deps?
|
|
||||||
|
# with the download queue: these should have already been installed
|
||||||
|
install_fetch_deps if !ignore_deps? && download_queue.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { void }
|
sig { void }
|
||||||
@ -475,6 +479,18 @@ class FormulaInstaller
|
|||||||
sig { params(_formula: Formula).returns(T.nilable(T::Boolean)) }
|
sig { params(_formula: Formula).returns(T.nilable(T::Boolean)) }
|
||||||
def fresh_install?(_formula) = false
|
def fresh_install?(_formula) = false
|
||||||
|
|
||||||
|
sig { void }
|
||||||
|
def fetch_fetch_deps
|
||||||
|
return if @compute_dependencies.blank?
|
||||||
|
|
||||||
|
compute_dependencies(use_cache: false) if @compute_dependencies.any? do |dep,|
|
||||||
|
next false unless dep.implicit?
|
||||||
|
|
||||||
|
fetch_dependencies
|
||||||
|
true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
sig { void }
|
sig { void }
|
||||||
def install_fetch_deps
|
def install_fetch_deps
|
||||||
return if @compute_dependencies.blank?
|
return if @compute_dependencies.blank?
|
||||||
@ -1455,8 +1471,6 @@ on_request: installed_on_request?, options:)
|
|||||||
# We also skip bottle installs from local bottle paths, as these are done in CI
|
# We also skip bottle installs from local bottle paths, as these are done in CI
|
||||||
# as part of the build lifecycle before attestations are produced.
|
# as part of the build lifecycle before attestations are produced.
|
||||||
if check_attestation &&
|
if check_attestation &&
|
||||||
# TODO: support this for download queues at some point
|
|
||||||
download_queue.nil? &&
|
|
||||||
Homebrew::Attestation.enabled? &&
|
Homebrew::Attestation.enabled? &&
|
||||||
formula.tap&.core_tap? &&
|
formula.tap&.core_tap? &&
|
||||||
formula.name != "gh"
|
formula.name != "gh"
|
||||||
@ -1545,7 +1559,7 @@ on_request: installed_on_request?, options:)
|
|||||||
# download queue has already done the actual staging but we'll lie about
|
# download queue has already done the actual staging but we'll lie about
|
||||||
# pouring now for nicer output
|
# pouring now for nicer output
|
||||||
ohai "Pouring #{downloadable.downloader.basename}"
|
ohai "Pouring #{downloadable.downloader.basename}"
|
||||||
downloadable.downloader.stage unless download_queue
|
downloadable.downloader.stage if download_queue.nil? || !formula.prefix.exist?
|
||||||
end
|
end
|
||||||
|
|
||||||
Tab.clear_cache
|
Tab.clear_cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user