all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Johan Andersson <johan.rejeep@gmail.com>, 16762@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	[thread overview]
Message-ID: <532CC639.6000309@yandex.ru> (raw)
In-Reply-To: <jwva9cj8tdh.fsf-monnier+emacsbugs@gnu.org>

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.





  reply	other threads:[~2014-03-21 23:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 16:06 bug#16762: Installed packages are not considered part of the archive contents Johan Andersson
2014-03-21  6:47 ` Dmitry Gutov
2014-03-21 15:33   ` Stefan Monnier
2014-03-21 23:07     ` Dmitry Gutov [this message]
2014-03-22  2:46       ` Stefan Monnier
2014-03-23  8:16         ` Dmitry Gutov
2014-03-24  0:55           ` Stefan
2014-03-24  6:20             ` Dmitry Gutov
2014-03-24  8:10               ` Johan Andersson
2014-03-24 13:07               ` Stefan
2014-03-24 14:32                 ` Dmitry Gutov
2014-03-24 18:17                   ` Stefan
2014-03-24 22:39                     ` Dmitry Gutov
2014-03-28  7:22                       ` Johan Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=532CC639.6000309@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=16762@debbugs.gnu.org \
    --cc=johan.rejeep@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.