From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?SmFuIFN5bsOhxI1law==?= Subject: Re: guix system: error: service 'ssh-daemon' requires 'networking', which is undefined Date: Thu, 21 Jul 2016 15:36:10 +0200 Message-ID: References: <874m7qzvyx.fsf@gnu.org> <0329ad9f3fc879d5b76e3d9bf895d75d@tobias.gr> <87wpkhlrwi.fsf@gnu.org> <87oa5rm9hi.fsf@gnu.org> 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]:54799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQE9F-0006PN-5I for guix-devel@gnu.org; Thu, 21 Jul 2016 09:36:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQE9D-0000ui-Rw for guix-devel@gnu.org; Thu, 21 Jul 2016 09:36:21 -0400 In-Reply-To: <87oa5rm9hi.fsf@gnu.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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel On Thu, Jul 21, 2016 at 3:00 PM, Ludovic Court=C3=A8s wrote: > Jan Syn=C3=A1=C4=8Dek skribis: > >> On Tue, Jul 19, 2016 at 2:43 PM, Ludovic Court=C3=A8s wro= te: >>> I improved the message along these lines in commit >>> 2c2ec261a8d3c37e5147038f47ad24c57cde4134, let me know what you think. >>> >>> To be more concrete about other improvements, here=E2=80=99s what shoul= d be >>> feasible (but needs to be discussed to see whether it=E2=80=99s actuall= y >>> helpful): >>> >>> 1. Display the location of the Shepherd service definition: >>> >>> gnu/services/ssh.scm:160:4: 'ssh-daemon' requires 'networking'= =E2=80=A6 >>> >>> Trivial to implement, but the downside is that the user doesn=E2= =80=99t >>> really care about this file. >>> >>> 2. Same, but also show some sort of a stack trace (but not an actual >>> Scheme stack trace) showing where this Shepherd service comes from= : >>> >>> gnu/services/ssh.scm:160:4: 'ssh-daemon' requires 'networking'= =E2=80=A6 >>> gnu/services/ssh.scm:117:30: =E2=80=A6 in extension of service '= shepherd' >>> gnu/services/ssh.scm:228:2: =E2=80=A6 while folding service 'lsh= =E2=80=99 instantiated here >>> >>> The problem is that, currently, we=E2=80=99d get the location of t= he >>> (service =E2=80=A6) form, which is in the =E2=80=98lsh-service=E2= =80=99 procedure, in >>> gnu/services/ssh.scm. >>> >>> It may be hard to come up with intelligible messages, and there=E2= =80=99s a >>> risk that showing too many lines of messages would be >>> counterproductive. >>> >>> Thoughts? > > Just to be clear, the message we now have is: > > service 'ssh-daemon' requires 'networking', which is not provided by an= y service >> From a regular user's point of view, this still misses the point, >> which I originally attempted to make. I suggest an error message like >> this: >> >> 'ssh-daemon' requires 'networking', try adding >> 'static-networking-service' or 'dhcp-client-service' to system >> services >> >> Or something like that. The point is, make it clear that "requires >> networking" means adding at least one service to the operating >> system's services and make at least one suggestion. Definitely a step >> forward to user friendliness. > > So I think you=E2=80=99re saying that, in addition to the error message, = you=E2=80=99d > like suggestions. Yes! > I like the idea. However, in this specific case, I=E2=80=99m not sure ho= w to > achieve it: =E2=80=98guix system=E2=80=99 doesn=E2=80=99t know about all = the Shepherd services > that can possibly exist, so it cannot tell you that the =E2=80=98networki= ng=E2=80=99 is > provided if you add =E2=80=98dhcp-client-service=E2=80=99 or whatnot to y= our config > file. For some reason, I thought it was already possible to ask for services that require some functionality, like networking for example (you know what service symbols are defined and you also know which of them provide 'networking', no?). I'm probably missing something. In this case, it might be a good improvement to add such thing to the API. Cheers, --=20 Jan Syn=C3=A1=C4=8Dek