all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Mark Oteiza <mvoteiza@udel.edu>,
	ueno@gnu.org, 22440@debbugs.gnu.org,
	Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#22440: 25.1.50; package.el fails to install with package-check-signature t
Date: Wed, 18 May 2016 16:33:04 -0300	[thread overview]
Message-ID: <87k2ir6u1b.fsf@gmail.com> (raw)
In-Reply-To: <87vb2b6ufy.fsf@gmail.com> (Artur Malabarba's message of "Wed, 18 May 2016 16:24:17 -0300")

Artur Malabarba <bruce.connor.am@gmail.com> writes:

> Paul Eggert <eggert@cs.ucla.edu> 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.

Here's a proposed fix.

---

Author:     Artur Malabarba <bruce.connor.am@gmail.com>

* 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'.

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

modified   lisp/emacs-lisp/package.el
@@ -302,10 +302,12 @@ package-directory-list
   :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
@@ -1457,8 +1459,6 @@ 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
@@ -1558,12 +1558,8 @@ package-refresh-contents
   (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 package-check-signature
+      (epg-find-configuration 'OpenPGP))
     (when (and package-check-signature (file-exists-p default-keyring))
       (condition-case-unless-debug error
           (package-import-keyring default-keyring)





  reply	other threads:[~2016-05-18 19:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23  0:48 bug#22440: 25.1.50; package.el fails to install with package-check-signature t Mark Oteiza
2016-05-15  7:03 ` Paul Eggert
2016-05-15 11:32   ` Dmitry Gutov
2016-05-15 16:50     ` Paul Eggert
2016-05-16 10:59       ` Artur Malabarba
2016-05-18 13:50         ` Artur Malabarba
2016-05-18 16:29           ` Mark Oteiza
2016-05-18 16:36           ` Dmitry Gutov
2016-05-18 16:44             ` Mark Oteiza
2016-05-18 18:10               ` Paul Eggert
2016-05-18 18:23                 ` Dmitry Gutov
2016-05-18 19:24                 ` Artur Malabarba
2016-05-18 19:33                   ` Artur Malabarba [this message]
2016-05-19  1:30                     ` Daiki Ueno
2016-05-18 19:43           ` Artur Malabarba
2016-05-18 20:43             ` Artur Malabarba
2016-05-18 21:09               ` Artur Malabarba
2016-05-18 22:05                 ` Paul Eggert
2016-05-18 23:11                   ` Artur Malabarba
2016-05-19 15:15                     ` Paul Eggert
2016-05-19  4:39       ` Lizzie Dixon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2ir6u1b.fsf@gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=22440@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eggert@cs.ucla.edu \
    --cc=mvoteiza@udel.edu \
    --cc=ueno@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.