From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH] system: Remove spec->file-system. Date: Fri, 2 Dec 2016 19:37:16 +0100 Message-ID: <20161202183716.25174-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCsqz-0005vH-EH for guix-devel@gnu.org; Fri, 02 Dec 2016 13:46:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCsqw-0005Zh-92 for guix-devel@gnu.org; Fri, 02 Dec 2016 13:46:37 -0500 Received: from so254-10.mailgun.net ([198.61.254.10]:36785) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCsqw-0005Yp-3X for guix-devel@gnu.org; Fri, 02 Dec 2016 13:46:34 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * 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." (($ 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 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 . 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 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