From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.devel Subject: Re: bug in handling of package-unsigned-archives Date: Mon, 5 Jun 2017 17:18:21 +0100 Message-ID: References: <864lziwhfi.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496679552 24879 195.159.176.226 (5 Jun 2017 16:19:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2017 16:19:12 +0000 (UTC) Cc: Emacs Development To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 05 18:19:07 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 1dHuic-0005uX-6D for ged-emacs-devel@m.gmane.org; Mon, 05 Jun 2017 18:19:02 +0200 Original-Received: from localhost ([::1]:34231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHuih-0005zK-Kn for ged-emacs-devel@m.gmane.org; Mon, 05 Jun 2017 12:19:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHuiW-0005z2-NZ for emacs-devel@gnu.org; Mon, 05 Jun 2017 12:18:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHuiV-0008KU-M2 for emacs-devel@gnu.org; Mon, 05 Jun 2017 12:18:56 -0400 Original-Received: from mail-ua0-x231.google.com ([2607:f8b0:400c:c08::231]:33670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHuiV-0008IS-Ic for emacs-devel@gnu.org; Mon, 05 Jun 2017 12:18:55 -0400 Original-Received: by mail-ua0-x231.google.com with SMTP id x47so78736295uab.0 for ; Mon, 05 Jun 2017 09:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8d1Y5FTAbTtt9/v7s2wBbnjo4DJPM9s9StksBGqfNgI=; b=hBQTw2dTECLnK8EMOexXHpwL44GSbxtenQvvythrP52v699LhoBfI3mRmpb+yJ7xHG w0IXjUtjXZrWifw0Egzjc2P6jekigdpWKnUxrm91tq+2vcaDY+pBxO7jsFSOM+fox3Pt O4ENRVaKSFkI07vY5ShdjZRBvW8G/689mTO/fClxjjvhxPwqqKnu8bd6LIqeb1lw9aBw KFcD+o1RCPweES2B3/4lsiFFRZRS7InTNppTnZGHLEsVLMItaa9mjFeh6BkDyHHNL8IO hv3I3HVXxWx0Dg25yS5oI6IcCbUGWcba9owpciGeslGjw2ZnuguW/2XAHpq9p5RlEd+R RPSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8d1Y5FTAbTtt9/v7s2wBbnjo4DJPM9s9StksBGqfNgI=; b=pgki0pN1zDKbcXFwMbk2KDlgF5SYNTxE0pJNN/c9BMQBpxrHw7k68+3e/Kh+kW1zvA hYuutR+vM1N9te5WesiYs5AoGhE5/skwgkY5seuFsQGFrvRG4id0X1DNbfKhsfxSYbrG FBuHb3awG5p+k4BcbOCjd1Ltk5j/87KOlNYpaSUtzisnrI3L221vPNlbRA4bGOylDjgS cgQb1dbhg68bJxl1b3l3lIkkKUlkLu9/UuJlGjmRfMpKdSWkmSnMFnoFqqhdQpceHLUi 1s7pg0EwrcdZka2Y0kEVYcYxhV86yKkrkfpe6IAD7uW1t0QyZKqoXbgatdeAi18TevHF 26Gw== X-Gm-Message-State: AODbwcBmG+1gSyxGcIdw2R+eJ7J9kcLrNYnAvlZb4YeJOmoi3HkR04zk 80aNev+MkCZWY7v3+9hWk5K7Iezqyg== X-Received: by 10.176.5.227 with SMTP id e90mr3656887uae.30.1496679532145; Mon, 05 Jun 2017 09:18:52 -0700 (PDT) Original-Received: by 10.159.34.230 with HTTP; Mon, 5 Jun 2017 09:18:21 -0700 (PDT) In-Reply-To: <864lziwhfi.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c08::231 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:215453 Archived-At: Andy's patch obviously fixes an obvious bug. According to my testing the bug definitely exists and the the patch definitely fixes it. Would someone with commit rights please commit it? On 25 February 2017 at 13:04, Andy Moreton wrote= : > > 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 =E2=80=98archive-contents=E2=80=99 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) > >