[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22440: 25.1.50; package.el fails to install with package-check-signa

From: Artur Malabarba
Subject: bug#22440: 25.1.50; package.el fails to install with package-check-signature t
Date: Wed, 18 May 2016 16:24:17 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> I observed the same thing, but as I have no idea how packages ought to work I 
> didn't know whether that was expected. If not, it's a bug too -- 
> should it get a different bug report or is this all the same bug?

Yes, it's a bug. Looks like it was introduced by the commit below.
I've CC'd Daiki.

Author:     Daiki Ueno <address@hidden>
AuthorDate: Wed Feb 17 16:44:16 2016 +0900

Take advantage of new GnuPG version check function

* lisp/emacs-lisp/package.el (epg-configuration-find): Declare.
(package-refresh-contents): Use `epg-configuration-find' to check if EPG
is usable.

1 file changed, 9 insertions(+), 6 deletions(-)
lisp/emacs-lisp/package.el | 15 +++++++++------

modified   lisp/emacs-lisp/package.el
@@ -1452,9 +1452,8 @@ package-initialize
 (defvar package--downloads-in-progress nil
   "List of in-progress asynchronous downloads.")
-(declare-function epg-check-configuration "epg-config"
-                  (config &optional minimum-version))
-(declare-function epg-configuration "epg-config" ())
+(declare-function epg-configuration-find "epg-config"
+                  (protocol &optional force))
 (declare-function epg-import-keys-from-file "epg" (context keys))
@@ -1554,11 +1553,15 @@ package-refresh-contents
   (let ((default-keyring (expand-file-name "package-keyring.gpg"
         (inhibit-message async))
+    (if (get 'package-check-signature 'saved-value)
+        (when package-check-signature
+          (epg-configuration-find 'OpenPGP))
+      (setq package-check-signature
+            (if (epg-configuration-find 'OpenPGP)
+                'allow-unsigned)))
     (when (and package-check-signature (file-exists-p default-keyring))
       (condition-case-unless-debug error
-          (progn
-            (epg-check-configuration (epg-configuration))
-            (package-import-keyring default-keyring))
+          (package-import-keyring default-keyring)
         (error (message "Cannot import default keyring: %S" (cdr error))))))
   (package--download-and-read-archives async))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]