aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2016-05-18 16:31:07 -0300
committerArtur Malabarba2016-05-20 16:22:13 -0300
commit421e3c4b2f14cfdf84a07095be1cbc76c9038da0 (patch)
tree7fabb0a1d2db64be849f5674714a7faeb7f7c31f
parentdadfc30dae9529282a05720155d4aa1c5bd749b1 (diff)
downloademacs-421e3c4b2f14cfdf84a07095be1cbc76c9038da0.tar.gz
emacs-421e3c4b2f14cfdf84a07095be1cbc76c9038da0.zip
* lisp/emacs-lisp/package.el (package-refresh-contents):
Don't change the value of `package-check-signature'. (package-check-signature): Use `epg-find-configuration' instead of `executable-find'.
-rw-r--r--lisp/emacs-lisp/package.el14
1 files changed, 4 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8f309cb798f..b0a6db087ba 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -301,10 +301,12 @@ contrast, `package-user-dir' contains packages for personal use."
301 :risky t 301 :risky t
302 :version "24.1") 302 :version "24.1")
303 303
304(defvar epg-gpg-program) 304(declare-function epg-find-configuration "epg-config"
305 (protocol &optional force))
305 306
306(defcustom package-check-signature 307(defcustom package-check-signature
307 (if (progn (require 'epg-config) (executable-find epg-gpg-program)) 308 (if (and (require 'epg-config)
309 (epg-find-configuration 'OpenPGP))
308 'allow-unsigned) 310 'allow-unsigned)
309 "Non-nil means to check package signatures when installing. 311 "Non-nil means to check package signatures when installing.
310The value `allow-unsigned' means to still install a package even if 312The value `allow-unsigned' means to still install a package even if
@@ -1461,8 +1463,6 @@ taken care of by `package-initialize'."
1461(defvar package--downloads-in-progress nil 1463(defvar package--downloads-in-progress nil
1462 "List of in-progress asynchronous downloads.") 1464 "List of in-progress asynchronous downloads.")
1463 1465
1464(declare-function epg-find-configuration "epg-config"
1465 (protocol &optional force))
1466(declare-function epg-import-keys-from-file "epg" (context keys)) 1466(declare-function epg-import-keys-from-file "epg" (context keys))
1467 1467
1468;;;###autoload 1468;;;###autoload
@@ -1562,12 +1562,6 @@ downloads in the background."
1562 (let ((default-keyring (expand-file-name "package-keyring.gpg" 1562 (let ((default-keyring (expand-file-name "package-keyring.gpg"
1563 data-directory)) 1563 data-directory))
1564 (inhibit-message async)) 1564 (inhibit-message async))
1565 (if (get 'package-check-signature 'saved-value)
1566 (when package-check-signature
1567 (epg-find-configuration 'OpenPGP))
1568 (setq package-check-signature
1569 (if (epg-find-configuration 'OpenPGP)
1570 'allow-unsigned)))
1571 (when (and package-check-signature (file-exists-p default-keyring)) 1565 (when (and package-check-signature (file-exists-p default-keyring))
1572 (condition-case-unless-debug error 1566 (condition-case-unless-debug error
1573 (package-import-keyring default-keyring) 1567 (package-import-keyring default-keyring)