unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39698] [PATCH] file-systems: Set default value of the check? field to #f for NFS
@ 2020-02-20 17:15 Maxim Cournoyer
       [not found] ` <handler.39698.B.158221893829402.ack@debbugs.gnu.org>
  2020-02-22 11:17 ` [bug#39698] [PATCH] file-systems: Set default value of the check? field to #f for NFS Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2020-02-20 17:15 UTC (permalink / raw)
  To: 39698


[-- Attachment #1.1: Type: text/plain, Size: 235 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-file-systems-Set-default-value-of-the-check-field-to.patch --]
[-- Type: text/x-patch, Size: 1715 bytes --]

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(-)

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-03  5:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 17:15 [bug#39698] [PATCH] file-systems: Set default value of the check? field to #f for NFS Maxim Cournoyer
     [not found] ` <handler.39698.B.158221893829402.ack@debbugs.gnu.org>
2020-02-20 20:29   ` [bug#39698] Acknowledgement ([PATCH] file-systems: Set default value of the check? field to #f for NFS) Maxim Cournoyer
2020-02-22 11:17 ` [bug#39698] [PATCH] file-systems: Set default value of the check? field to #f for NFS Ludovic Courtès
2020-02-24 16:15   ` Maxim Cournoyer
2020-02-26 20:41     ` Ludovic Courtès
2020-03-03  5:05       ` bug#39698: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).