all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 39698@debbugs.gnu.org
Subject: [bug#39698] [PATCH] file-systems: Set default value of the check? field to #f for NFS
Date: Thu, 20 Feb 2020 12:15:30 -0500	[thread overview]
Message-ID: <87d0a9i3il.fsf@gmail.com> (raw)


[-- 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 --]

             reply	other threads:[~2020-02-20 17:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 17:15 Maxim Cournoyer [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0a9i3il.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=39698@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.