This is an automated email from the git hooks/post-receive script.
guix_mirror_bot pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 7e7487166b file-systems: canonicalize-device-spec: Wait for device to
exist.
7e7487166b is described below
commit 7e7487166b02aa41d42e96a1dfccaceda7fefc12
Author: Rutherther <[email protected]>
AuthorDate: Wed Feb 4 21:26:53 2026 +0100
file-systems: canonicalize-device-spec: Wait for device to exist.
Waits for devices specified by a string.
Fixes: #6134
Change-Id: I430483deccb70fad44fe0e141afc050ae41308dc
Signed-off-by: Maxim Cournoyer <[email protected]>
---
gnu/build/file-systems.scm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 72d7f5f260..33b035aa96 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1220,15 +1220,16 @@ file name or an nfs-root containing ':/')."
(sleep 1)
(loop (+ 1 count))))))))
+ (define (device-exists? device)
+ (and (file-exists? device)
+ device))
+
(match spec
((? string?)
- (if (or (string-contains spec ":/") ;nfs
- (and (>= (string-length spec) 2)
- (equal? (string-take spec 2) "//")) ;cifs
- (string=? spec "none"))
- spec ; do not resolve NFS / CIFS / tmpfs devices
+ (if (string-prefix? "/dev/" spec)
;; Nothing to do, but wait until SPEC shows up.
- (resolve identity spec identity)))
+ (resolve device-exists? spec identity)
+ spec)) ; do not resolve NFS / CIFS / tmpfs devices
((? file-system-label?)
;; Resolve the label.
(resolve find-partition-by-label