From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.diffs,gmane.emacs.devel Subject: Re: master b689b90: Package archives now have priorities. Date: Fri, 16 Jan 2015 21:48:28 -0200 Message-ID: References: <20150116102411.11014.8945@vcs.savannah.gnu.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1421452116 27255 80.91.229.3 (16 Jan 2015 23:48:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2015 23:48:36 +0000 (UTC) Cc: emacs-diffs@gnu.org To: emacs-devel , Jorgen Schaefer Original-X-From: emacs-diffs-bounces+gnu-emacs-diffs=m.gmane.org@gnu.org Sat Jan 17 00:48:36 2015 Return-path: Envelope-to: gnu-emacs-diffs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YCGd2-0002gV-1o for gnu-emacs-diffs@m.gmane.org; Sat, 17 Jan 2015 00:48:36 +0100 Original-Received: from localhost ([::1]:57848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCGd1-0005B9-DA for gnu-emacs-diffs@m.gmane.org; Fri, 16 Jan 2015 18:48:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCGcy-0005AG-5U for emacs-diffs@gnu.org; Fri, 16 Jan 2015 18:48:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCGcu-0003FK-TK for emacs-diffs@gnu.org; Fri, 16 Jan 2015 18:48:32 -0500 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:57125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCGcu-0003F9-NN; Fri, 16 Jan 2015 18:48:28 -0500 Original-Received: by mail-oi0-f43.google.com with SMTP id i138so19772355oig.2; Fri, 16 Jan 2015 15:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=JHZXYUuXduoGAC6dRVCcR34aejIHutIM0sUFtZguTrI=; b=0YW66PUyndtU6dqMp9fFVpusvX2xVgKQCDPt6rnT/MVZw7mh3kulYUDlipQgYF9PmJ j+KRh8u3AWkIl9ts24fnQ1Bptjg8ubT+eXaCdWpOQ4ABp74xnyn2wTW8Jlvu5xsffrde USiDf+qoQcAM6cJRt0sqp5ENJffPoTeXw7Pz750DMpt/Vp793Z8udl1RFMegS4cVOQkw 9JuagZ/QsR4mwsnBVure7SF6Ca7KlDtyddeE4fwABJPxAp561SOAPghapNXA7JFyN3OJ pJd0hXDGwIze7pKhUGNW0tFUNE/lcp6V2VvIh/Yt/zI9ySKDvODdh9BJPIIxihWghVuk sTxA== X-Received: by 10.60.146.194 with SMTP id te2mr11118956oeb.58.1421452108188; Fri, 16 Jan 2015 15:48:28 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Fri, 16 Jan 2015 15:48:28 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: 0ndfQ-OG0-TLpLnFPFO61K_9Lww X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22b X-BeenThere: emacs-diffs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mailing list for Emacs changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-diffs-bounces+gnu-emacs-diffs=m.gmane.org@gnu.org Original-Sender: emacs-diffs-bounces+gnu-emacs-diffs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.diffs:128473 gmane.emacs.devel:181359 Archived-At: > +(defcustom package-archive-priorities nil > + "An alist of priorities for packages. > + > +Each element has the form (ARCHIVE-ID . PRIORITY). > + > +When installing packages, the package with the highest version > +number from the archive with the highest priority is > +selected. When higher versions are available from archives with > +lower priorities, the user has to select those manually. > + > +Archives not in this list have the priority 0." > + :type 'integer I think you meant 'alist? > +(defun package--add-to-alist (pkg-desc alist) > + "Add PKG-DESC to ALIST. > + > +Packages are grouped by name. The package descriptions are sorted > +by version number." > + (let* ((name (package-desc-name pkg-desc)) > + (priority-version (package-desc-priority-version pkg-desc)) > + (existing-packages (assq name alist))) > + (if (not existing-packages) > + (cons (list name pkg-desc) This list should be a cons, probably why the test is failing.