unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: bug in handling of package-unsigned-archives
Date: Mon, 20 Feb 2017 15:50:34 +0000	[thread overview]
Message-ID: <vz1bmtwx3n9.fsf@gmail.com> (raw)


Consider the following package archive setup:

(setq package-archives '(("melpa" . "https://melpa.org/packages/")
                         ("gnu"   . "https://elpa.gnu.org/packages/")))
(setq package-check-signature   t)
(setq package-unsigned-archives '("melpa"))

Using "M-x list-packages" results in an error being reported: "Unsigned
file ‘archive-contents’ at https://melpa.org/packages/". This is caused
by an incorrect check in package.el - the following patch fixes it.

2017-02-20  Andy Moreton  <andrewjmoreton@gmail.com>

	Fix check for package-unsigned-archives during retrieval.

	* lisp/emacs-lisp/package.el (package--download-one-archive):
          Fix check for package-unsigned-archives.

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 6728f1b..13b8051 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1522,7 +1522,7 @@ package--download-one-archive
       (when (listp (read-from-string content))
         (make-directory dir t)
         (if (or (not package-check-signature)
-                (member archive package-unsigned-archives))
+                (member name package-unsigned-archives))
             ;; If we don't care about the signature, save the file and
             ;; we're done.
             (progn (write-region content nil local-file nil 'silent)




             reply	other threads:[~2017-02-20 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 15:50 Andy Moreton [this message]
2017-02-25 13:04 ` bug in handling of package-unsigned-archives Andy Moreton
2017-06-05 16:18   ` Richard Copley
2017-06-05 22:12     ` Dmitry Gutov
2017-06-05 22:16 ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=vz1bmtwx3n9.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).