From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] system: Remove spec->file-system. Date: Sun, 04 Dec 2016 16:48:21 +0100 Message-ID: <87oa0r7l16.fsf@gnu.org> References: <20161202183716.25174-1-david@craven.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDZ1g-0000JR-SF for guix-devel@gnu.org; Sun, 04 Dec 2016 10:48:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDZ1b-0000zP-Vw for guix-devel@gnu.org; Sun, 04 Dec 2016 10:48:28 -0500 In-Reply-To: <20161202183716.25174-1-david@craven.ch> (David Craven's message of "Fri, 2 Dec 2016 19:37:16 +0100") 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: David Craven Cc: guix-devel@gnu.org David Craven skribis: > * gnu/system/file-systems.scm (spec->file-system): Remove variable. > * gnu/system/linux-container.scm (container-script): Refactor. [...] > --- a/gnu/system/linux-container.scm > +++ b/gnu/system/linux-container.scm > @@ -81,8 +81,7 @@ MAPPINGS is a list of objects that specif= y 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)))) >=20=20 > (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)) >=20=20 > - (call-with-container (map spec->file-system '#$specs) > + (call-with-container #$file-systems AFAICS that doesn=E2=80=99t work because and records in gener= al are not automatically marshalled/unmarshalled when staging code. Thus, the above would leave to an invalid on-disk s-expression like this: (begin (use-modules =E2=80=A6) (call-with-container (#< =E2=80=A6> #< =E2=80= =A6>) =E2=80=A6)) Manually calling =E2=80=98file-system->spec=E2=80=99 on the host side, and = then =E2=80=98spec->file-system=E2=80=99 on the build side is a way to explicitly marshall/unmarshall the record (I mentioned it as a current limitation of gexps in my Scheme Workshop talk). Makes sense? Thanks, Ludo=E2=80=99.