From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catonano Subject: Re: wrong type of agument... where ? Date: Mon, 1 Jan 2018 11:54:50 +0100 Message-ID: References: <20171231132321.0186e7de@scratchpost.org> <20171231153503.3d0f9797@scratchpost.org> <20180101003918.501ab0c3@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e0821f684ba0f420561b4cf42" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVxk5-0002f5-AW for guix-devel@gnu.org; Mon, 01 Jan 2018 05:54:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVxk3-00020m-TA for guix-devel@gnu.org; Mon, 01 Jan 2018 05:54:53 -0500 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:46486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVxk3-00020Q-NS for guix-devel@gnu.org; Mon, 01 Jan 2018 05:54:51 -0500 Received: by mail-yw0-x233.google.com with SMTP id l23so10095799ywb.13 for ; Mon, 01 Jan 2018 02:54:51 -0800 (PST) In-Reply-To: <20180101003918.501ab0c3@scratchpost.org> 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: Danny Milosavljevic Cc: guix-devel --089e0821f684ba0f420561b4cf42 Content-Type: text/plain; charset="UTF-8" Danny, 2018-01-01 0:39 GMT+01:00 Danny Milosavljevic : > Try this: > > diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm > index 4dd740174..810a0d63f 100644 > --- a/gnu/build/linux-boot.scm > +++ b/gnu/build/linux-boot.scm > @@ -507,7 +507,14 @@ to it are lost." > (switch-root "/root") > (format #t "loading '~a'...\n" to-load) > > - (primitive-load to-load) > + (catch #t > + (lambda () > + (primitive-load to-load)) > + (lambda (key . args) > + (format (current-error-port) "Error: ~a: ~a\n" key args) > + (reboot)) > + (lambda (key . args) > + (display-backtrace (make-stack #t) > (current-error-port)))) > > (format (current-error-port) > "boot program '~a' terminated, rebooting~%" > thank you so much for this ! I don't know if it' s current anymore, though In fact, I have discovered some errors I made in the code Now the trytond test succeeds (yay !) and I don't get ushered in a REPL anymore There wee seveal problems First, I hadn't pdated gnulocal.mk with my new files gnu/services/trytond.scm gnu/tests/trytond.scm Also the Gexpression used in my trytond activation was garbled, so the shepherd serrvice coldn't run As a consequence, in the test definition this piece of code (marionette-eval '(begin (use-modules (gnu services herd)) (match (start-service 'trytond) (#f #f) (('service response-parts ...) (match (assq-ref response-parts 'running) ((pid) (number? pid)))))) marionette)) didn't succeed. In the match clause, the (#f #f) case ensued (I suppose) I discovered all this by creating a virtual machine based on my trytond branch and running it manually After I fixed all these glitches, the system test run as a charm So now I'm a bit overwhelmed and I don't know if your suggestion is still currrent I can tell you, though, that I feel very reassured by the fact that someone tried to help me out ! I'll keep your suggestion in mind, should I have any further problems with the marionette service Happy New Year ! Ciao Cato --089e0821f684ba0f420561b4cf42 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Danny,

2018-01-01 0:39 GMT+01:00 Danny Milosavljevic <danny= m@scratchpost.org>:
Try thi= s:

diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 4dd740174..810a0d63f 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -507,7 +507,14 @@ to it are lost."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (switch-root "/root&q= uot;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format #t "loading &= #39;~a'...\n" to-load)

-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(primitive-load to-load) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(catch #t
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda ()
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(primitive-l= oad to-load))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (key . args= )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(format (cur= rent-error-port) "Error: ~a: ~a\n" key args)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(reboot)) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (key . args= )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(display-bac= ktrace (make-stack #t) (current-error-port))))

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (format (current-error-por= t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 "boot program '~a' terminated, rebooting~%"

thank you so much for this !
=
I don't know if it' s current = anymore, though

In fact, I have discovered some errors I made in the code

Now the tryto= nd test succeeds (yay !) and I don't get ushered in a REPL anymore
<= br>
There wee seveal problems

=
First, I hadn't pdated gnulocal.mk with my new files

gnu/services/trytond.scm
gnu/tests/trytond.scm

Also the Gexpression used in my trytond activation = was garbled, so the shepherd serrvice coldn't run

As a consequence, in the test definition this piece of c= ode

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 (marionette-eval
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 '(begin
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (use-modules (gnu se= rvices herd))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match (start-service 'trytond)
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 (#f #f)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (('s= ervice response-parts ...)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match (ass= q-ref response-parts 'running)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ((pid) (number? pid))))))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 marionette))


didn't succeed. In the match clause, the (#f #f) cas= e ensued (I suppose)

I discovered a= ll this by creating a virtual machine based on my trytond branch and runnin= g it manually

After I fixed all the= se glitches, the system test run as a charm

So now I'm a bit overwhelmed = and I don't know if your suggestion is still currrent

I can tell you, though, that I feel very reassured b= y the fact that someone tried to help me out !

I'll keep your suggestion in mind, should I have any furthe= r problems with the marionette service

Happy New Year !
Ciao
Cato
--089e0821f684ba0f420561b4cf42--