The primary audience of the
guix refresh command is developers
of the GNU software distribution. By default, it reports any packages
provided by the distribution that are outdated compared to the latest
upstream version, like this:
$ guix refresh gnu/packages/gettext.scm:29:13: gettext would be upgraded from 0.18.1.1 to 0.18.2.1 gnu/packages/glib.scm:77:12: glib would be upgraded from 2.34.3 to 2.37.0
It does so by browsing each package’s FTP directory and determining the highest version number of the source tarballs therein8.
--update, it modifies distribution source files to
update the version numbers and source tarball hashes of those packages’
recipes (see Defining Packages). This is achieved by downloading
each package’s latest source tarball and its associated OpenPGP
signature, authenticating the downloaded tarball against its signature
gpg, and finally computing its hash. When the public
key used to sign the tarball is missing from the user’s keyring, an
attempt is made to automatically retrieve it from a public key server;
when it’s successful, the key is added to the user’s keyring; otherwise,
guix refresh reports an error.
The following options are supported:
Update distribution source files (package recipes) in place. See Defining Packages, for more information on package definitions.
Select all the packages in subset, one of
core subset refers to all the packages at the core of the
distribution—i.e., packages that are used to build “everything
else”. This includes GCC, libc, Binutils, Bash, etc. Usually,
changing one of these packages in the distribution entails a rebuild of
all the others. Thus, such updates are an inconvenience to users in
terms of build time or bandwidth used to achieve the upgrade.
non-core subset refers to the remaining packages. It is
typically useful in cases where an update of the core packages would be
guix refresh can be passed one or more package
names, as in this example:
guix refresh -u emacs idutils
The command above specifically updates the
idutils packages. The
--select option would have no
effect in this case.
When considering whether to upgrade a package, it is sometimes
convenient to know which packages would be affected by the upgrade and
should be checked for compatibility. For this the following option may
be used when passing
guix refresh one or more package names:
List top-level dependent packages that would need to be rebuilt as a result of upgrading one or more packages.
Be aware that the
--list-dependent option only
approximates the rebuilds that would be required as a result of
an upgrade. More rebuilds might be required under some circumstances.
$ guix refresh --list-dependent flex Building the following 120 packages would ensure 213 dependent packages are rebuilt: hop-2.4.0 geiser-0.4 notmuch-0.18 mu-0.9.9.5 cflow-1.4 idutils-4.6 …
The command above lists a set of packages that could be built to check
for compatibility with an upgraded
The following options can be used to customize GnuPG operation:
Use command as the GnuPG 2.x command. command is searched
Handle missing OpenPGP keys according to policy, which may be one of:
Always download missing OpenPGP keys from the key server, and add them to the user’s GnuPG keyring.
Never try to download missing OpenPGP keys. Instead just bail out.
When a package signed with an unknown OpenPGP key is encountered, ask the user whether to download it or not. This is the default behavior.
Use host as the OpenPGP key server when importing a public key.
Currently, this only works for GNU packages.