Subject: bug#55854: "guix refresh" doesn't handle older versions like gtk+@2

From: Kaelyn <[email-masked]>
Date: Wed, 08 Jun 2022 17:18:54 +0000

When attempting a mass "guix refresh -ru" of system and home profile packages, some bogus updates were encountered. One category of those is older/multiple versions of a package all being updated to the latest, as was seen with gtk+@2, libsigc++@2, and the gtkmm packages. For example:

$  guix refresh gtk+@2
gnu/packages/gtk.scm:851:13: gtk+ would be upgraded from 2.24.33 to 3.94.0

Per the IRC discussion at https://logs.guix.gnu.org/guix/2022-06-08.log#185744, those packages should only be upgraded within the same major version. Maxime suggested adding a REQUIRED-MAJOR-VERSION field to such packages so they are updated correctly: https://logs.guix.gnu.org/guix/2022-06-08.log#185842

(Side note: I believe gtk+ uses a numbering scheme of x.9y.0 for pre-releases of the (x+1).0.0 release; i.e. gtk+ 3.94.0 is a pre-release of gtk 4.)