Merge pull request #19605 from Homebrew/bottle_manifest_cleanup

cleanup: fix handling of bottle manifest rebuilds.
This commit is contained in:
Mike McQuaid 2025-03-25 18:47:07 +00:00 committed by GitHub
commit 3289196603
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,6 +151,12 @@ module Homebrew
formula_excluded_versions_from_cleanup = excluded_versions_from_cleanup(formula)
return false if formula_excluded_versions_from_cleanup.include?(version.to_s)
if pathname.to_s.include?("_bottle_manifest")
excluded_version = version.to_s
excluded_version.sub!(/-\d+$/, "")
return false if formula_excluded_versions_from_cleanup.include?(excluded_version)
end
# We can't determine an installed rebuild and parsing manifest version cannot be reliably done.
return false unless formula.latest_version_installed?