From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: bug in handling of package-unsigned-archives Date: Sat, 25 Feb 2017 13:04:01 +0000 Message-ID: <864lziwhfi.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1488027903 2120 195.159.176.226 (25 Feb 2017 13:05:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Feb 2017 13:05:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 25 14:04:57 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chc1u-00088D-HJ for ged-emacs-devel@m.gmane.org; Sat, 25 Feb 2017 14:04:54 +0100 Original-Received: from localhost ([::1]:42700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chc20-00071x-8I for ged-emacs-devel@m.gmane.org; Sat, 25 Feb 2017 08:05:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chc1R-00071s-1f for emacs-devel@gnu.org; Sat, 25 Feb 2017 08:04:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chc1M-0000w2-MD for emacs-devel@gnu.org; Sat, 25 Feb 2017 08:04:25 -0500 Original-Received: from [195.159.176.226] (port=44101 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chc1M-0000vl-F2 for emacs-devel@gnu.org; Sat, 25 Feb 2017 08:04:20 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1chc18-0003yz-Ab for emacs-devel@gnu.org; Sat, 25 Feb 2017 14:04:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:zXuk+J34NAbdwDa6fK7uf1HKwco= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212591 Archived-At: Ping! On Mon 20 Feb 2017, Andy Moreton wrote: > 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 > > 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)