GNU bug report logs - #24467
adding package archives after calling package-initialize lists all their packages as "new"

Previous Next

Package: emacs;

Reported by: SK Kim <tttuuu888 <at> gmail.com>

Date: Mon, 19 Sep 2016 05:49:02 UTC

Severity: minor

Tags: confirmed

Merged with 21703

Found in versions 25.0.50, 25.1

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 24467 <at> debbugs.gnu.org, SK Kim <tttuuu888 <at> gmail.com>, npostavs <at> users.sourceforge.net
Subject: bug#24467: 25.1; package
Date: Sat, 03 Nov 2018 11:07:25 -0400
>> Ah, so the packages are "new" in the sense that they come from
>> archives added after package-initialize was called.
>
> I'm not sure whether this is by design and if we would break something
> if we changed it.  I think the fix would be quite trivial: simply
> speaking, we would change `package-read-all-archive-contents' to iterate
> over "$package-user-dir/archives/*" instead of `package-archives'.

It's clearly a bug, and it's made worse in Emacs-27 where
package-initialize is called automatically before reading ~/.emacs.

IOW, I think "this" needs to be fixed before Emacs-27.1.

The fix you propose might work (tho with unintended side effects), but
I don't see any reason why we need to package-read-all-archive-contents
so early on anyway.  More specifically, package-activate-all should be
changed so it doesn't end up running package-read-all-archive-contents:
it's already the case when a package-quickstart-file is found, but if
there's no such file we call package-initialize which ends up calling
package-read-all-archive-contents even though we're only interested in
the package-load-all-descriptors part, really.


        Stefan




This bug report was last modified 3 years and 301 days ago.

Previous Next


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