(name . guix-patches)(address . guix-patches@gnu.org)
The attached patch makes the default value of the <file-system> record
check? filed smarter, and avoids boot failures when using an NFS system
and omitting to specify "check? #f".
There are no checkers for NFS and none are required.
From d6b5a47036b21ec4bf4109cd781ed76208713b71 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 20 Feb 2020 11:51:37 -0500
Subject: [PATCH] file-systems: Set default value of the check? field to #f for
NFS.
Network file systems do not need to be checked locally, so provide a better
default value.
* gnu/system/file-systems.scm (<file-system>): Make the check? field thunked,
and compute the default value based on its own type.
---
gnu/system/file-systems.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Toggle diff (27 lines)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 7b78731524..03b143fcac 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -101,6 +101,8 @@
(define-record-type* <file-system> %file-system
make-file-system
file-system?
+ this-file-system
+
(device file-system-device) ; string | <uuid> | <file-system-label>
(mount-point file-system-mount-point) ; string
(type file-system-type) ; string
@@ -113,7 +115,10 @@
(needed-for-boot? %file-system-needed-for-boot? ; Boolean
(default #f))
(check? file-system-check? ; Boolean
- (default #t))
+ (thunked)
+ (default (not (string-prefix-ci?
+ (file-system-type this-file-system)
+ "nfs"))))
(create-mount-point? file-system-create-mount-point? ; Boolean
(default #f))
(dependencies file-system-dependencies ; list of <file-system>
--
2.25.0
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAl5OvrIACgkQEmDkZILm
NWJ9fBAAj+BIFeU+DYvglksrHnlT5znoramfzzBkTSVlCGKVhW9rTv3MjY+d597o
s4U0YdJVYxsCE/eo36e4goKWp8aM4HSVtU65LlCdN69YaqOMMWF/0Nf1vkvfuadT
kZOHBQvWH66Q/DaNwVAjg2AM7EBaZCyd6dFSzhcFct7Zk9aYCsh3cNwb2Skh6Fmw
4bvAtuXXaywl5Ap6R4QnyexvsKNrDmy7i/y6TRlmuZ2S2cY/eO3yu7KZshOj5nzG
YFPMh2cD3NyIQYLHQPEe11s44MWvo1/b0ZtVI7NWd1wuc8m8xMx0CvywWmoH9Foy
gDJeBF9U0l2rarahdl7ToXV9Nlsgzaw6UPH6SaprRpvAo3y1Tf9B/lVvw4eT1Gkq
5felyijOBV35PtuGsghhhC3eiW121cdW/jpB7LepL8emoBlK2waJBAS05HGBpSiS
4qLhT43s4f0tRQDGbcwQ2L9wiaiB551YvSwEluRSuFXebTOd8A3NGMaB7vikS9Js
ufszb3kat1M/bcDAGxVhlfQ9mGjCszhxl3dj16fDK9Uy3pL90geJItnzlM9L7UBN
E6YSVow1y0JyOpUFiGosAHwFpquzVDmx9bT5eNidAlBog0AAfKBOewpCn6RV/F0C
qPX729JKEn8Yf1QDvbetb1gB9X8x4x9NtYhsDLNX605JCIHKp0s=
=lOTZ
-----END PGP SIGNATURE-----