help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do package.el handles "duplicate packages"?


From: Eduardo Ochs
Subject: Re: How do package.el handles "duplicate packages"?
Date: Fri, 25 Nov 2022 00:58:39 -0300

On Fri, 25 Nov 2022 at 00:05, Stefan Monnier via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> More seriously, I don't think it's clearly documented there, so better
> ask more precise questions.
>
> (...)
>
> As the docstring of `package-archive-contents` describes, there should
> be only one entry for `afternoon-theme` but that entry should contain
> two `package-desc` objects: one for Melpa and one for NonGNU.

Ah, I missed that!

Note that the current docstring doesn't mention that one of the entries
is for nongnu and the other one is for melpa:

  
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/package.el#n1513

  (defvar package-archive-contents nil
    "Cache of the contents of all archives in `package-archives'.
  This is an alist mapping package names (symbols) to
  non-empty lists of `package-desc' structures.")

Anyway, if I change the cl-loop in my previous e-mail to this,

  (setq my-ps
    (cl-loop for (name . pdescs) in package-archive-contents
             if (> (length pdescs) 1)
             collect (cons name pdescs)))

it produces a list of the packages with duplicate entries, and I can
use that to compare the two entries.

Next question: is there a way to determine which of the entries -
nongnu or melpa - corresponds to a version that is more recent?

Thanks in advance! =)
  Eduardo Ochs
  http://angg.twu.net/#eev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]