]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el (package-refresh-contents):
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 18 May 2016 19:31:07 +0000 (16:31 -0300)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 20 May 2016 19:22:13 +0000 (16:22 -0300)
Don't change the value of `package-check-signature'.
(package-check-signature): Use `epg-find-configuration'
instead of `executable-find'.

lisp/emacs-lisp/package.el

index 8f309cb798fef5200fd62ae87e446654afc70621..b0a6db087ba27e795adb5d6916f472917baf015f 100644 (file)
@@ -301,10 +301,12 @@ contrast, `package-user-dir' contains packages for personal use."
   :risky t
   :version "24.1")
 
-(defvar epg-gpg-program)
+(declare-function epg-find-configuration "epg-config"
+                  (protocol &optional force))
 
 (defcustom package-check-signature
-  (if (progn (require 'epg-config) (executable-find epg-gpg-program))
+  (if (and (require 'epg-config)
+           (epg-find-configuration 'OpenPGP))
       'allow-unsigned)
   "Non-nil means to check package signatures when installing.
 The value `allow-unsigned' means to still install a package even if
@@ -1461,8 +1463,6 @@ taken care of by `package-initialize'."
 (defvar package--downloads-in-progress nil
   "List of in-progress asynchronous downloads.")
 
-(declare-function epg-find-configuration "epg-config"
-                  (protocol &optional force))
 (declare-function epg-import-keys-from-file "epg" (context keys))
 
 ;;;###autoload
@@ -1562,12 +1562,6 @@ downloads in the background."
   (let ((default-keyring (expand-file-name "package-keyring.gpg"
                                            data-directory))
         (inhibit-message async))
-    (if (get 'package-check-signature 'saved-value)
-        (when package-check-signature
-          (epg-find-configuration 'OpenPGP))
-      (setq package-check-signature
-            (if (epg-find-configuration 'OpenPGP)
-                'allow-unsigned)))
     (when (and package-check-signature (file-exists-p default-keyring))
       (condition-case-unless-debug error
           (package-import-keyring default-keyring)