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

From: Daniel Mendler <[email-masked]>
Date: Sat, 11 Jan 2025 12:23:42 +0100

Currently `package-upgrade-all' displays the number of packages to
upgrade. I suggest to instead show a list of the names of the packages
which are about to be upgraded. This way the user has a better chance to
review the packages before they get installed. Of course the user can
have better control by going via the `list-packages' interface. However
I argue that package.el should not offer UIs and confirmations which
omit relevant information in order to improve security.

The current `package-upgrade-all' confirmation is as follows:

(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))))))
  (user-error "Upgrade aborted"))

I suggest to replace it with this:

(when (and query
           (not (yes-or-no-p
                 (format
                  "Upgrade %s?"
                  (mapconcat #'symbol-name upgradeable ", ")))))
  (user-error "Upgrade aborted"))

If the list gets too long, a popup window could be used. See also the
related bug#74604 regarding diffs on package upgrade.

Daniel