unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] system: Remove spec->file-system.
@ 2016-12-02 18:37 David Craven
  2016-12-02 23:23 ` David Craven
  2016-12-04 15:48 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: David Craven @ 2016-12-02 18:37 UTC (permalink / raw)
  To: guix-devel

* gnu/system/file-systems.scm (spec->file-system): Remove variable.
* gnu/system/linux-container.scm (container-script): Refactor.
---
 gnu/system/file-systems.scm    | 11 -----------
 gnu/system/linux-container.scm |  6 ++----
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4cc1221..b51d57f 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -40,7 +40,6 @@
             file-system-dependencies
 
             file-system->spec
-            spec->file-system
             specification->file-system-mapping
             uuid
 
@@ -108,16 +107,6 @@ initrd code."
     (($ <file-system> device title mount-point type flags options _ _ check?)
      (list device title mount-point type flags options check?))))
 
-(define (spec->file-system sexp)
-  "Deserialize SEXP, a list, to the corresponding <file-system> object."
-  (match sexp
-    ((device title mount-point type flags options check?)
-     (file-system
-       (device device) (title title)
-       (mount-point mount-point) (type type)
-       (flags flags) (options options)
-       (check? 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
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 24e61c3..0146df1 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -81,8 +81,7 @@ MAPPINGS is a list of <file-system> objects that specify the files/directories
 that will be shared with the host system."
   (let* ((os           (containerized-operating-system os mappings))
          (file-systems (filter file-system-needed-for-boot?
-                               (operating-system-file-systems os)))
-         (specs        (map file-system->spec file-systems)))
+                               (operating-system-file-systems os))))
 
     (mlet* %store-monad ((os-drv (operating-system-derivation
                                   os
@@ -94,10 +93,9 @@ that will be shared with the host system."
                                   (gnu build linux-container)))
           #~(begin
               (use-modules (gnu build linux-container)
-                           (gnu system file-systems) ;spec->file-system
                            (guix build utils))
 
-              (call-with-container (map spec->file-system '#$specs)
+              (call-with-container #$file-systems
                 (lambda ()
                   (setenv "HOME" "/root")
                   (setenv "TMPDIR" "/tmp")
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-05 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 18:37 [PATCH] system: Remove spec->file-system David Craven
2016-12-02 23:23 ` David Craven
2016-12-04 15:48 ` Ludovic Courtès
2016-12-04 16:19   ` David Craven
2016-12-05 20:58     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).