From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH} Add RAID devices. Date: Mon, 25 Jul 2016 22:59:30 +0200 Message-ID: <871t2hh1sd.fsf@gnu.org> References: <20160714131306.GA11566@solar> <20160723140701.GB6873@solar> <87bn1n4mld.fsf@gmail.com> 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]:36976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRmyQ-0002sd-K8 for guix-devel@gnu.org; Mon, 25 Jul 2016 16:59:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRmyP-0000mn-Np for guix-devel@gnu.org; Mon, 25 Jul 2016 16:59:38 -0400 In-Reply-To: <87bn1n4mld.fsf@gmail.com> (Chris Marusich's message of "Sat, 23 Jul 2016 22:43:58 -0700") 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: Chris Marusich Cc: guix-devel@gnu.org, myglc2 Hello, Chris Marusich skribis: > Andreas Enge writes: [...] >> + #~(let ((every (@ (srfi srfi-1) every))) > > Can't you just use "every" on its own? It looks like you've imported > the srfi-1 module earlier on. I=E2=80=99m the one who suggested it as a =E2=80=9Ctemporary hack=E2=80=9D,= as we call such things. ;-) The story is that this expression here gets stages in non-top-level position, where it cannot directly do =E2=80=98use-modules=E2=80=99, hence = this hack. This should be fixed eventually, possibly in gexp themselves. >> + (unless (every file-exists? '#$source) >> + (format #t "waiting a bit...~%") >> + (sleep 1) >> + (loop))) > > Does the code in this gexp get invoked every time the system starts up? > Why is a loop better here than an error? What if the source device > files never show up? Right, another super-temporary hack. The right thing would be to do like =E2=80=98canonicalize-device-spec=E2=80=99 in (gnu build file-systems)= does, which is to error out after a few iterations, with the effect of spawning an emergency REPL. The mechanism to wait for devices should be factorized. > Also, will that string be properly localized? No it won=E2=80=99t, indeed. Currently message catalogs and locales are unavailable in the initrd, and it would probably make the initrd pretty big to add them, so I=E2=80=99d be tempted to ignore i18n for early boot messages that hopefully few people will notice. Thanks, Ludo=E2=80=99.