From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Thierry Volpiatto <thievol@posteo.net>, 72141@debbugs.gnu.org
Subject: bug#72141: 29.4; package-upgrade vs package-load-list
Date: Sun, 28 Jul 2024 11:47:44 +0000 [thread overview]
Message-ID: <871q3drb4v.fsf@posteo.net> (raw)
In-Reply-To: <865xsr2tn0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Jul 2024 10:14:59 +0300")
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Thierry Volpiatto <thievol@posteo.net>
>> Date: Tue, 16 Jul 2024 14:46:37 +0000
>>
>>
>> I think there is a bug here, but please verify with following recipe as
>> I don't use widely package installation, at least for myself. When reading
>> the code I believe it is reproductible as well on emacs-30+.
>>
>> 1) Install package foo and bar.
>> 2) Disable them in package-load-list ((foo nil) (bar nil) all).
>> 3) Wait some time until foo and/or bar have new versions available.
>> 4) Call package-upgrade-all. It will call package-upgrade on foo
>> and bar (and possibly others). When package-upgrade find foo
>> package it will (1) delete it and (2) call package-install which
>> will refuse to install (error) because foo is disabled.
>>
>> As a result we have lost foo package, it is now uninstalled.
>> Same problem with M-x package-upgrade, foo and bar are listed in
>> completion and made available whereas they are going to fail to
>> upgrade.
>
> Philip, any comments or suggestions?
The issue is that we don't install a package if it is disabled. So
either we allow installing (but don't activate) disabled packages, or we
ignore disabled packages during upgrades. That might just need this
change:
[-- Attachment #2: Type: text/plain, Size: 596 bytes --]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7cae8d68bc0..eb77d99fad2 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2286,6 +2286,9 @@ package--upgradeable-packages
(or (let ((available
(assq (car elt) package-archive-contents)))
(and available
+ (package-disabled-p
+ (cadr elt)
+ (package-desc-version (cadr elt)))
(or (and
include-builtins
(not (package-desc-version (cadr elt))))
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
Philip Kaludercic on peregrine
next prev parent reply other threads:[~2024-07-28 11:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 14:46 bug#72141: 29.4; package-upgrade vs package-load-list Thierry Volpiatto
2024-07-27 7:14 ` Eli Zaretskii
2024-07-28 11:47 ` Philip Kaludercic [this message]
2024-07-28 12:27 ` Thierry Volpiatto
2024-07-28 12:27 ` Eli Zaretskii
2024-07-28 12:39 ` Thierry Volpiatto
2024-08-01 6:48 ` Thierry Volpiatto
2024-08-03 3:22 ` Thierry Volpiatto
2024-08-04 14:57 ` Philip Kaludercic
2024-08-04 17:15 ` Thierry Volpiatto
2024-08-10 17:16 ` Thierry Volpiatto
2024-08-12 16:36 ` Philip Kaludercic
2024-08-12 17:36 ` Thierry Volpiatto
2024-08-12 18:16 ` Thierry Volpiatto
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=871q3drb4v.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=72141@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=thievol@posteo.net \
/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.