GNU bug report logs - #16762
Installed packages are not considered part of the archive contents

Previous Next

Package: emacs;

Reported by: Johan Andersson <johan.rejeep <at> gmail.com>

Date: Sat, 15 Feb 2014 16:07:02 UTC

Severity: normal

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Johan Andersson <johan.rejeep <at> gmail.com>, 16762 <at> debbugs.gnu.org
Subject: bug#16762: Installed packages are not considered part of the archive contents
Date: Sat, 22 Mar 2014 01:07:37 +0200
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.




This bug report was last modified 11 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.