@@ -13,6 +13,7 @@
;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
+;;; Copyright © 2024 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -109,7 +110,8 @@ (define (delete-matching-generations store profile
pattern)
a string denoting a set of generations: the empty list means \"all
generations
but the current one\", a number designates a generation, and other
patterns
denote ranges as interpreted by 'matching-generations'."
- (let ((current (generation-number profile)))
+ (let ((current (generation-number profile))
+ (pattern (if pattern pattern ""))) ; ensure pattern is a string
(cond ((not (file-exists? profile)) ; XXX: race condition
(raise (condition (&profile-not-found-error
(profile profile)))))
@@ -19,6 +19,7 @@
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1850,7 +1851,7 @@ (define* (display-search-results matches port
(define (string->generations str)
"Return the list of generations matching a pattern in STR. This
function
-accepts the following patterns: \"1\", \"1,2,3\", \"1..9\", \"1..\",
\"..9\"."
+accepts the following patterns: \"1\", \"1,2,3\", \"1..9\", \"1..\",
\"..9\", \"..\"."