guix-commits
[Top][All Lists]
Advanced

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

03/03: ui: Remove dependency on (gnu system file-systems).


From: Ludovic Courtès
Subject: 03/03: ui: Remove dependency on (gnu system file-systems).
Date: Thu, 4 Aug 2016 17:38:46 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit d77a0bd6f1aa709fcec1041fcdde33942335d75b
Author: Ludovic Courtès <address@hidden>
Date:   Thu Aug 4 19:08:08 2016 +0200

    ui: Remove dependency on (gnu system file-systems).
    
    * guix/ui.scm (specification->file-system-mapping): Move to...
    * gnu/system/file-systems.scm (specification->file-system-mapping):
    ... here.
---
 gnu/system/file-systems.scm |   18 ++++++++++++++++++
 guix/ui.scm                 |   19 -------------------
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index f4cfaf0..116e281 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -40,6 +40,7 @@
             file-system-dependencies
 
             file-system->spec
+            specification->file-system-mapping
             uuid
 
             %fuse-control-file-system
@@ -105,6 +106,23 @@ initrd code."
     (($ <file-system> device title mount-point type flags options _ _ check?)
      (list device title mount-point type flags options check?))))
 
+(define (specification->file-system-mapping spec writable?)
+  "Read the SPEC and return the corresponding <file-system-mapping>.  SPEC is
+a string of the form \"SOURCE\" or \"SOURCE=TARGET\".  The former specifies
+that SOURCE from the host should be mounted at SOURCE in the other system.
+The latter format specifies that SOURCE from the host should be mounted at
+TARGET in the other system."
+  (let ((index (string-index spec #\=)))
+    (if index
+        (file-system-mapping
+         (source (substring spec 0 index))
+         (target (substring spec (+ 1 index)))
+         (writable? writable?))
+        (file-system-mapping
+         (source spec)
+         (target spec)
+         (writable? writable?)))))
+
 (define-syntax uuid
   (lambda (s)
     "Return the bytevector corresponding to the given UUID representation."
diff --git a/guix/ui.scm b/guix/ui.scm
index 4d1b65c..906b349 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -36,7 +36,6 @@
   #:use-module ((guix build utils) #:select (mkdir-p))
   #:use-module ((guix licenses) #:select (license? license-name))
   #:use-module ((guix build syscalls) #:select (terminal-columns))
-  #:use-module (gnu system file-systems)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-19)
@@ -83,7 +82,6 @@
             string->recutils
             package->recutils
             package-specification->name+version+output
-            specification->file-system-mapping
             string->generations
             string->duration
             matching-generations
@@ -1126,23 +1124,6 @@ optionally contain a version number and an output name, 
as in these examples:
                  (package-name->name+version name)))
     (values name version sub-drv)))
 
-(define (specification->file-system-mapping spec writable?)
-  "Read the SPEC and return the corresponding <file-system-mapping>.  SPEC is
-a string of the form \"SOURCE\" or \"SOURCE=TARGET\".  The former specifies
-that SOURCE from the host should be mounted at SOURCE in the other system.
-The latter format specifies that SOURCE from the host should be mounted at
-TARGET in the other system."
-  (let ((index (string-index spec #\=)))
-    (if index
-        (file-system-mapping
-         (source (substring spec 0 index))
-         (target (substring spec (+ 1 index)))
-         (writable? writable?))
-        (file-system-mapping
-         (source spec)
-         (target spec)
-         (writable? writable?)))))
-
 
 ;;;
 ;;; Command-line option processing.



reply via email to

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