From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63587@debbugs.gnu.org, Andreas Kurth <emacs@akurth.de>
Subject: bug#63587: 29.0.91; package-menu-mark-upgrades does not show available upgrades
Date: Sat, 27 May 2023 08:04:23 +0000 [thread overview]
Message-ID: <871qj2urnc.fsf@posteo.net> (raw)
In-Reply-To: <83sfbqqfit.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 May 2023 11:01:46 +0300")
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Fri, 19 May 2023 08:30:46 +0200
>> From: Andreas Kurth <emacs@akurth.de>
>>
>> after setting package-install-upgrade-built-in to a non-nil value, the
>> command "M-x package-menu-mark-upgrades" won’t show upgradeable non
>> built-in packages (magit, embark, ...) any more. Same for pressing "U"
>> in the package menu. Also, the command "M-x list-packages" won’t
>> announce upgradeable packages in the echo area.
>>
>> Setting package-install-upgrade-built-in to nil will revert that
>> faulty behaviour.
>>
>> I bisected the error to commit
>> ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e in emacs-29 branch.
>
> Philip, could you please look into this issue?
I've taken a look at the issue, and think this small change should fix
the issue:
[-- Attachment #2: Type: text/plain, Size: 694 bytes --]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 325c7b4e0a6..01826da273d 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3751,8 +3751,8 @@ package-menu--find-upgrades
(and avail-pkg
(version-list-< (package-desc-priority-version pkg-desc)
(package-desc-priority-version avail-pkg))
- (xor (not package-install-upgrade-built-in)
- (package--active-built-in-p pkg-desc))
+ (or (not (package--active-built-in-p pkg-desc))
+ package-install-upgrade-built-in)
(push (cons name avail-pkg) upgrades))))
upgrades))
[-- Attachment #3: Type: text/plain, Size: 870 bytes --]
And before I just propose a different change, I'd like to try and prove
that it fixes the above issue. For a package with an update, let
p := is a built-in package
q := built-in packages should be upgradede
The previous implementation with xor (p ⊻ q) correctly decides to
upgrade or not-upgrade the package in three of the four possible cases
p q upgrade?
--------------
t f f
t t t
f t f <-- this was Andreas case
f f t
But since non-built-in packages should always be upgraded, we need to
change the condition to only be false when we have a built-in package
but `package-install-upgrade-built-in' is non-nil:
¬ (¬ q ∧ p)
= ¬¬ q ∨ ¬p
= q ∨ ¬p
as we see, this should solve the issue:
p q upgrade? (p ∨ ¬q)
--------------
t f f
t t t
f t t
f f t
Does this look OK?
next prev parent reply other threads:[~2023-05-27 8:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 6:30 bug#63587: 29.0.91; package-menu-mark-upgrades does not show available upgrades Andreas Kurth
2023-05-21 8:01 ` Eli Zaretskii
2023-05-25 19:20 ` Eli Zaretskii
2023-05-25 20:04 ` Philip Kaludercic
2023-05-27 8:04 ` Philip Kaludercic [this message]
2023-05-27 16:31 ` Andreas Kurth
2023-05-29 11:08 ` Eli Zaretskii
2023-09-06 20:12 ` Stefan Kangas
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=871qj2urnc.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=63587@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=emacs@akurth.de \
/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.