diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-05-17 13:06:32 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-05-17 13:10:11 +0900 |
commit | 3fadea42548389141e84a8481d271ac7280de7bc (patch) | |
tree | f96ba9dc4ca8794b67d1a3ed3e072004f3d8a361 | |
parent | 6465931bbc118d4ed9da652b0be74ed844b52b2a (diff) | |
download | guix-3fadea42548389141e84a8481d271ac7280de7bc.tar.gz guix-3fadea42548389141e84a8481d271ac7280de7bc.zip |
import: Guard against potential type error.
The import-gnu-release could crash with a "Wrong type (expecting pair): ()"
error, as seen when attempting to recursively refresh a package, e.g.:
$ guix refresh -r xdg-desktop-portal-gnome
It would crash on attempting to refresh 'bash-static'.
* guix/gnu-maintenance.scm (import-gnu-release): Guard against a potentially
empty VERSIONS list.
Change-Id: Ib4edb4b721e6053b09ef144a1b16fe23b35649b0
-rw-r--r-- | guix/gnu-maintenance.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 7f7fafd569..dcb7f3b61a 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -801,7 +801,9 @@ list available from %GNU-FILE-LIST-URI over HTTP(S)." (find (cut version-prefix? version <>) (force versions))) version - (first (force versions)))) + (match (force versions) + ((? null?) #f) + (lst (first lst))))) ;; Find tarballs matching this version. (tarballs (filter (lambda (file) (string=? version (tarball->version file))) |