Subject: bug#75490: 30.0.93; package-upgrade-all - show upgradeable packages

From: Daniel Mendler <[email-masked]>
Date: Sun, 12 Jan 2025 22:00:23 +0100

I've attached a patch to this mail. The yes-or-no-p function handles
longs strings well, such that this works even if there are many
upgradeable packages.

Daniel

>From ac5662962a94f5457d6d9287161a08b6401c5b83 Mon Sep 17 00:00:00 2001
From: Daniel Mendler <[email-masked]>
Date: Sun, 12 Jan 2025 21:54:43 +0100
Subject: [PATCH] package-upgrade-all: Show list of upgradeable packages

Instead of only displaying the number of upgradeable packages,
display the package names for the user to check.

* lisp/emacs-lisp/package.el (package-upgrade-all): Show list of
upgradeable packages.
---
 lisp/emacs-lisp/package.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b62d026f6ff..450e1dcd00e 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2322,10 +2322,9 @@ package-upgrade-all
         (message "No packages to upgrade")
       (when (and query
                  (not (yes-or-no-p
-                       (if (length= upgradeable 1)
-                           "One package to upgrade.  Do it? "
-                         (format "%s packages to upgrade.  Do it?"
-                                 (length upgradeable))))))
+                       (format
+                        "Upgrade %s?"
+                        (mapconcat #'symbol-name upgradeable ", ")))))
         (user-error "Upgrade aborted"))
       (mapc #'package-upgrade upgradeable))))
 
-- 
2.45.2