forked from Homebrew/brew
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formula_auditor: skip dependency conflict audit for OpenSSL migration
We can't migrate the entire OpenSSL dependency tree in one go, so we'll have to skip this audit in the interim. See Homebrew/homebrew-core#133144.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -345,12 +345,28 @@ def audit_deps | |
# TODO: remove this and check these there too. | ||
return if Homebrew::SimulateSystem.simulating_or_running_on_linux? | ||
|
||
# Skip the versioned dependencies conflict audit on the OpenSSL migration branch. | ||
# TODO: Remove this when OpenSSL migration is complete. | ||
ignore_openssl_conflict = if (github_event_path = ENV.fetch("GITHUB_EVENT_PATH", nil)).present? | ||
event_payload = JSON.parse(File.read(github_event_path)) | ||
head_info = event_payload.dig("pull_request", "head") | ||
|
||
# We need to read the head ref from `GITHUB_EVENT_PATH` because | ||
# `git branch --show-current` returns `master` on PR branches. | ||
openssl_migration_branch = head_info["ref"] == "openssl-migration" | ||
homebrew_owned_repo = head_info.dig("repo", "owner", "login") == "Homebrew" | ||
homebrew_core_pr = head_info.dig("repo", "name") == "homebrew-core" | ||
|
||
openssl_migration_branch && homebrew_owned_repo && homebrew_core_pr | ||
end | ||
|
||
recursive_runtime_formulae = formula.runtime_formula_dependencies(undeclared: false) | ||
version_hash = {} | ||
version_conflicts = Set.new | ||
recursive_runtime_formulae.each do |f| | ||
name = f.name | ||
unversioned_name, = name.split("@") | ||
next if unversioned_name == "openssl" && ignore_openssl_conflict | ||
# Allow use of the full versioned name (e.g. `[email protected]`) or an unversioned alias (`python`). | ||
next if formula.tap&.audit_exception :versioned_formula_dependent_conflicts_allowlist, name | ||
next if formula.tap&.audit_exception :versioned_formula_dependent_conflicts_allowlist, unversioned_name | ||
|