From ca9b8bea2e57264a9ff7c2be8d0dd02ba25eafb3 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Wed, 9 Aug 2017 16:52:52 +0100 Subject: [PATCH 1/2] gpg: flip search priority order Makes more sense this way around now Homebrew has migrated across to 2.1.x & the latest version of that doesn't install as `gpg2` any more. Doesn't need to be merged before this PR but for the sake of referencing the PR introducing the upstream death of the `gpg2` symlink is: https://github.com/Homebrew/homebrew-core/pull/16580 --- Library/Homebrew/gpg.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/gpg.rb b/Library/Homebrew/gpg.rb index cb9e367dfc..3b7c4f726d 100644 --- a/Library/Homebrew/gpg.rb +++ b/Library/Homebrew/gpg.rb @@ -7,8 +7,8 @@ class Gpg next unless gpg_short_version gpg_version = Version.create(gpg_short_version.to_s) @version = gpg_version - gpg_version == Version.create("2.0") || - gpg_version == Version.create("2.1") + gpg_version == Version.create("2.1") || + gpg_version == Version.create("2.0") end end @@ -20,7 +20,7 @@ class Gpg find_gpg("gpg2") end - GPG_EXECUTABLE = gpg2 || gpg + GPG_EXECUTABLE = gpg || gpg2 def self.available? File.executable?(GPG_EXECUTABLE.to_s) From 0762cc6e74446bc46fa2daa4faffa229dd40e49c Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Wed, 9 Aug 2017 17:02:14 +0100 Subject: [PATCH 2/2] gpg2_requirement: flip search priority --- Library/Homebrew/requirements/gpg2_requirement.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/requirements/gpg2_requirement.rb b/Library/Homebrew/requirements/gpg2_requirement.rb index 97fabcca0d..d570983eb1 100644 --- a/Library/Homebrew/requirements/gpg2_requirement.rb +++ b/Library/Homebrew/requirements/gpg2_requirement.rb @@ -5,8 +5,8 @@ class GPG2Requirement < Requirement fatal true default_formula "gnupg" - # MacGPG2/GPGTools installs GnuPG 2.0.x as a vanilla `gpg` symlink - # pointing to `gpg2`, as do we. Ensure we're actually using a 2.0 `gpg`. - # Support both the 2.0.x "stable" and 2.1.x "modern" series. - satisfy(build_env: false) { Gpg.gpg2 || Gpg.gpg } + # GPGTools installs GnuPG 2.0.x as a vanilla `gpg` symlink + # pointing to `gpg2`. Homebrew install 2.1.x as a non-symlink `gpg`. + # We support both the 2.0.x "stable" and 2.1.x "modern" series here. + satisfy(build_env: false) { Gpg.gpg || Gpg.gpg2 } end