aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJCount2017-03-23 10:55:22 -0400
committerGitHub2017-03-23 10:55:22 -0400
commitd1be51d2cd889a5c337cdbf153a083b22d0b940a (patch)
tree37bede09345c8541bba465e8b80d75692089f4d3
parentf8cf506670bfd9d6d931411eb0c4b74c040f90df (diff)
parentca303f6195bbe0a8cc47e87a6fa530a35d3b6b5e (diff)
downloadbrew-d1be51d2cd889a5c337cdbf153a083b22d0b940a.tar.bz2
Merge pull request #2343 from JCount/gpg-requirement-add-2.1-series
gpg: add GnuPG series 2.1.x to supported versions
-rw-r--r--Library/Homebrew/gpg.rb4
-rw-r--r--Library/Homebrew/requirements/gpg2_requirement.rb4
2 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/gpg.rb b/Library/Homebrew/gpg.rb
index 066f67864..777542055 100644
--- a/Library/Homebrew/gpg.rb
+++ b/Library/Homebrew/gpg.rb
@@ -5,7 +5,9 @@ class Gpg
which_all(executable).detect do |gpg|
gpg_short_version = Utils.popen_read(gpg, "--version")[/\d\.\d/, 0]
next unless gpg_short_version
- Version.create(gpg_short_version.to_s) == Version.create("2.0")
+ gpg_version = Version.create(gpg_short_version.to_s)
+ gpg_version == Version.create("2.0") ||
+ gpg_version == Version.create("2.1")
end
end
diff --git a/Library/Homebrew/requirements/gpg2_requirement.rb b/Library/Homebrew/requirements/gpg2_requirement.rb
index 00bf4183a..97fabcca0 100644
--- a/Library/Homebrew/requirements/gpg2_requirement.rb
+++ b/Library/Homebrew/requirements/gpg2_requirement.rb
@@ -3,10 +3,10 @@ require "gpg"
class GPG2Requirement < Requirement
fatal true
- default_formula "gnupg2"
+ 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`.
- # Temporarily, only support 2.0.x rather than the 2.1.x "modern" series.
+ # Support both the 2.0.x "stable" and 2.1.x "modern" series.
satisfy(build_env: false) { Gpg.gpg2 || Gpg.gpg }
end