From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elihI-0003iS-2j for guix-patches@gnu.org; Tue, 13 Feb 2018 17:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elihD-00022S-4v for guix-patches@gnu.org; Tue, 13 Feb 2018 17:05:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33991) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elihD-00022H-18 for guix-patches@gnu.org; Tue, 13 Feb 2018 17:05:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1elihC-0003Hs-Ir for guix-patches@gnu.org; Tue, 13 Feb 2018 17:05:02 -0500 Subject: [bug#30355] [PATCH] services: agetty: Make tty optional and add agetty instance to base services. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180205081553.5930-1-dannym@scratchpost.org> <87d11e1dbj.fsf@gnu.org> <20180209204912.379ddae7@scratchpost.org> <877erlygas.fsf@gnu.org> <20180210230711.693d1452@scratchpost.org> Date: Tue, 13 Feb 2018 23:04:10 +0100 In-Reply-To: <20180210230711.693d1452@scratchpost.org> (Danny Milosavljevic's message of "Sat, 10 Feb 2018 23:07:11 +0100") Message-ID: <87bmgsv95x.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 30355@debbugs.gnu.org Heya, Danny Milosavljevic skribis: > I tried this now: > > (define (default-serial-port) > "Return a gexp that determines a reasonable default serial port > to use as the tty. This is primarily useful for headless systems." > #~(begin > ;; console=3Ddevice,options > ;; device: can be tty0, ttyS0, lp0, ttyUSB0 (serial). > ;; options: BBBBPNF. P n|o|e, N number of bits, > ;; F flow control (r RTS) > (use-modules (gnu build linux-boot) (ice-9 match)) [...] > (match specs > (() #f) > ((spec _ ...) > ;; Extract device name from first spec. > (match (string-tokenize spec not-comma) > ((device-name _ ...) > device-name))))))) > > I get=20 > > $ ./pre-inst-env guix system reconfigure /etc/config.scm --fallback > ... > guix system: error: exception caught while executing 'eval' on service 'r= oot': > ERROR: Syntax error: > unknown location: unexpected syntax in form () That=E2=80=99s a sign that the outermost =E2=80=98match=E2=80=99 wasn=E2=80= =99t macro-expanded, hence the error about (). I got it: that=E2=80=99s because this gexp is spliced in a non-top-level context. The end result is something like: (let ((foo bar) (baz (begin (use-modules =E2=80=A6) =E2=80=A6))) =E2=80=A6) and the =E2=80=98use-modules=E2=80=99 there doesn=E2=80=99t have the desire= d effect. The fix is to remove this =E2=80=98use-modules=E2=80=99 form and instead to= pass the modules as the =E2=80=98modules=E2=80=99 field of =E2=80=98shepherd-service= =E2=80=99: (shepherd-service (modules '((ice-9 match) =E2=80=A6)) ;; =E2=80=A6 ) Does that work for you? Sorry for overlooking this before! Ludo=E2=80=99.