From 278d486b0c0e3ec0378f6a2ccf6946fb176d088b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 21 Mar 2017 21:55:20 +0100 Subject: file-systems: Do not use (gnu packages …). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a regression introduced in 7208995426714c9fc3ad59cadc3cc0f52df0f018 whereby (gnu system file-systems) would pull in (gnu packages …) module, which in turn breaks when importing things like (gnu build shepherd). * gnu/system/file-systems.scm (file-system-type-predicate): Export. (file-system-packages): Move to... * gnu/system/linux-initrd.scm (file-system-packages): ... here. Add docstring. * gnu/services/base.scm: Use it. * tests/file-systems.scm ("does not pull (gnu packages …)"): New test. --- gnu/system/file-systems.scm | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'gnu/system/file-systems.scm') diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 8107722c74..3bd072a0bc 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -22,8 +22,6 @@ #:use-module (guix records) #:use-module ((gnu build file-systems) #:select (string->uuid uuid->string)) - #:use-module (gnu packages linux) - #:use-module (gnu packages disk) #:re-export (string->uuid uuid->string) #:export ( @@ -41,6 +39,8 @@ file-system-create-mount-point? file-system-dependencies + file-system-type-predicate + file-system->spec spec->file-system specification->file-system-mapping @@ -67,8 +67,6 @@ file-system-mapping->bind-mount - file-system-packages - %store-mapping %network-configuration-files %network-file-mappings)) @@ -77,6 +75,9 @@ ;;; ;;; Declaring file systems to be mounted. ;;; +;;; Note: this file system is used both in the Shepherd and on the "host +;;; side", so it must not include (gnu packages …) modules. +;;; ;;; Code: ;; File system declaration. @@ -419,22 +420,4 @@ a bind mount." (lambda (fs) (string=? (file-system-type fs) type))) -(define* (file-system-packages file-systems #:key (volatile-root? #f)) - `(,@(if (find (lambda (fs) - (string-prefix? "ext" (file-system-type fs))) - file-systems) - (list e2fsck/static) - '()) - ,@(if (find (lambda (fs) - (string-suffix? "fat" (file-system-type fs))) - file-systems) - (list fatfsck/static) - '()) - ,@(if (find (file-system-type-predicate "btrfs") file-systems) - (list btrfs-progs/static) - '()) - ,@(if volatile-root? - (list unionfs-fuse/static) - '()))) - ;;; file-systems.scm ends here -- cgit v1.2.3