From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#16762: Installed packages are not considered part of the archive contents Date: Sat, 22 Mar 2014 01:07:37 +0200 Message-ID: <532CC639.6000309@yandex.ru> References: <87lhw4nj42.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1395443321 16657 80.91.229.3 (21 Mar 2014 23:08:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 23:08:41 +0000 (UTC) Cc: Johan Andersson , 16762@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 22 00:08:49 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WR8YS-00020W-6r for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Mar 2014 00:08:48 +0100 Original-Received: from localhost ([::1]:54959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR8YR-0002j4-ML for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 19:08:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR8Xr-0002eg-Jg for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 19:08:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR8Xi-0005Wo-EX for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 19:08:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR8Xi-0005Wk-Au for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 19:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WR8Xi-0004FI-2P for bug-gnu-emacs@gnu.org; Fri, 21 Mar 2014 19:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Mar 2014 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16762-submit@debbugs.gnu.org id=B16762.139544326516285 (code B ref 16762); Fri, 21 Mar 2014 23:08:02 +0000 Original-Received: (at 16762) by debbugs.gnu.org; 21 Mar 2014 23:07:45 +0000 Original-Received: from localhost ([127.0.0.1]:44005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WR8XR-0004Eb-AE for submit@debbugs.gnu.org; Fri, 21 Mar 2014 19:07:45 -0400 Original-Received: from mail-ee0-f42.google.com ([74.125.83.42]:56051) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WR8XO-0004ES-Us for 16762@debbugs.gnu.org; Fri, 21 Mar 2014 19:07:44 -0400 Original-Received: by mail-ee0-f42.google.com with SMTP id d17so2342725eek.1 for <16762@debbugs.gnu.org>; Fri, 21 Mar 2014 16:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=rgyjVo2v14GcvHjq4F51KMxY1TxG+a0K+q0Cic6izeE=; b=r4bC/w9Txf6SFjb/jXwlnsi/5AbEQSroa+m04RDZ/3VNxMlSCBNfGvdrLRQui9bEvW J2GIR8F7fulQDpcwgUPwBMNrUsj4PFcXSsxNKdHYWZam+5bNz0BYIrG4rw45aiQmCMUR lmmFcaNeNNaRxiLNtz74oBZ9hvLNOmKLk6tTefnIB4UvZHYSqsRozP9+c6JetagPKl7X JFr5ltQdDrR0CwSW69pUyjA5iO133b+UsPpiFEK0WWeLkSXToYVKzwOffHTIK3BSMK5U hL9+z8BmYEA/chMSY2WyQbiRhASzWBefMorm2Hw3lm+GxWzEonzu31Jk/BVFzxXORnCv PFmg== X-Received: by 10.14.199.8 with SMTP id w8mr140621een.94.1395443260469; Fri, 21 Mar 2014 16:07:40 -0700 (PDT) Original-Received: from [192.168.10.2] (93-22-183.netrun.cytanet.com.cy. [93.109.22.183]) by mx.google.com with ESMTPSA id 48sm14783973eee.2.2014.03.21.16.07.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 16:07:39 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87125 Archived-At: On 21.03.2014 17:33, Stefan Monnier wrote: > Clearly, the intention of my changes was to move towards a situation > where package-archive-contents indeed holds all the packages in the > archives. AFAICS, the revision in question did the reverse: it made installed packages excluded from package-archive-contents (as long as the installed version is not obsolete). Here's the relevant part: @@ -914,19 +889,25 @@ (entry (cons name pkg-desc)) (existing-package (assq name package-archive-contents)) (pinned-to-archive (assoc name package-pinned-packages))) - (cond ((and pinned-to-archive - ;; If pinned to another archive, skip entirely. - (not (equal (cdr pinned-to-archive) archive))) - nil) - ((not existing-package) - (push entry package-archive-contents)) - ((version-list-< (package-desc-version (cdr existing-package)) - (package-desc-version pkg-desc)) - ;; Replace the entry with this one. - (setq package-archive-contents - (cons entry - (delq existing-package - package-archive-contents))))))) + (cond + ;; Skip entirely if pinned to another archive or if no more recent + ;; than what we already have installed. + ((or (and pinned-to-archive + (not (equal (cdr pinned-to-archive) archive))) + (let ((bi (assq name package--builtin-versions))) + (and bi (version-list-<= version (cdr bi)))) + (let ((ins (cdr (assq name package-alist)))) + (and ins (version-list-<= version (package-desc-version ins))))) + nil) + ((not existing-package) + (push entry package-archive-contents)) + ((version-list-< (package-desc-version (cdr existing-package)) + version) + ;; Replace the entry with this one. + (setq package-archive-contents + (cons entry + (delq existing-package + package-archive-contents))))))) (defun package-download-transaction (package-list) "Download and install all the packages in PACKAGE-LIST. > If you can show an actual problem that this causes (from the user's > point of view), we can try to fix it. Johan? > And in trunk feel free to try and change things so that those packages > are included in package-archive-contents. I think this change, might be more beneficial to apply in 24.4. This way, the packages interfacing with package.el (like Epl, already mentioned here) won't have to deal with the sudden jump in behavior specific only to 24.4, but not versions before or after it. > (as would be a change that gets rid of the other > exceptions such as the packages that are "on-hold"). I agree that it would make sense, and that would be better left for trunk.