From a5f66c2446c61a072413e417b27fb9499f8b42fa Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sun, 4 Feb 2024 03:19:53 +0100 Subject: file-systems: Recognize “none” as a valid device spec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/build/file-systems (canonicalize-device-name): Fallback to tmpfs if spec is "none". Change-Id: Ia55c715d04c7611ba8c979f23f1ad4a8ed2e75b6 Signed-off-by: Ludovic Courtès --- gnu/build/file-systems.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gnu/build') diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 36a59f5f5c..78d779f398 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 David C. Trudgian ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2022 Oleg Pykhalov +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -1021,8 +1022,8 @@ were found." (define (canonicalize-device-spec spec) "Return the device name corresponding to SPEC, which can be a , a -, or a string (typically a /dev file name or an nfs-root -containing ':/')." +, the string 'none' or another string (typically a /dev +file name or an nfs-root containing ':/')." (define max-trials ;; Number of times we retry partition label resolution, 1 second per ;; trial. Note: somebody reported a delay of 16 seconds (!) before their @@ -1046,8 +1047,8 @@ containing ':/')." (match spec ((? string?) - (if (string-contains spec ":/") - spec ; do not resolve NFS devices + (if (or (string-contains spec ":/") (string=? spec "none")) + spec ; do not resolve NFS / tmpfs devices ;; Nothing to do, but wait until SPEC shows up. (resolve identity spec identity))) ((? file-system-label?) -- cgit v1.2.3