guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: mapped-devices: Do not always use (gnu build file-systems).


From: Ludovic Courtès
Subject: 01/03: mapped-devices: Do not always use (gnu build file-systems).
Date: Tue, 2 Aug 2016 11:53:55 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit dfe06f6e7f486eb42a2b71e9d0ae52dfe8e3bb26
Author: Ludovic Courtès <address@hidden>
Date:   Tue Aug 2 12:25:03 2016 +0200

    mapped-devices: Do not always use (gnu build file-systems).
    
    Fixes <http://bugs.gnu.org/24129>.
    Reported by myglc2 <address@hidden>.
    
    * gnu/system/mapped-devices.scm (device-mapping-service-type): Remove
    'modules' field from 'shepherd-service' form.
    (open-luks-device): Add 'use-modules' form.
---
 gnu/system/mapped-devices.scm |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index d0a9f02..1cfd649 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -81,14 +81,7 @@
        (documentation "Map a device node using Linux's device mapper.")
        (start #~(lambda () #$(open source target)))
        (stop #~(lambda _ (not #$(close source target))))
-       (respawn? #f)
-
-       ;; Add the modules needed by LUKS-DEVICE-MAPPING.
-       ;; FIXME: This info should be propagated via gexps.
-       (modules `((rnrs bytevectors)              ;bytevector?
-                  ((gnu build file-systems)
-                   #:select (find-partition-by-luks-uuid))
-                  ,@%default-modules)))))))
+       (respawn? #f))))))
 
 (define (device-mapping-service mapped-device)
   "Return a service that sets up @var{mapped-device}."
@@ -105,6 +98,11 @@
   (with-imported-modules '((gnu build file-systems)
                            (guix build bournish))
     #~(let ((source #$source))
+        ;; XXX: 'use-modules' should be at the top level.
+        (use-modules (rnrs bytevectors)           ;bytevector?
+                     ((gnu build file-systems)
+                      #:select (find-partition-by-luks-uuid)))
+
         (zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup")
                         "open" "--type" "luks"
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]