guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix system: error: service 'ssh-daemon' requires 'networking', whic


From: Jan Synáček
Subject: Re: guix system: error: service 'ssh-daemon' requires 'networking', which is undefined
Date: Thu, 21 Jul 2016 15:36:10 +0200

On Thu, Jul 21, 2016 at 3:00 PM, Ludovic Courtès <address@hidden> wrote:
> Jan Synáček <address@hidden> skribis:
>
>> On Tue, Jul 19, 2016 at 2:43 PM, Ludovic Courtès <address@hidden> wrote:
>>> I improved the message along these lines in commit
>>> 2c2ec261a8d3c37e5147038f47ad24c57cde4134, let me know what you think.
>>>
>>> To be more concrete about other improvements, here’s what should be
>>> feasible (but needs to be discussed to see whether it’s actually
>>> helpful):
>>>
>>>   1. Display the location of the Shepherd service definition:
>>>
>>>        gnu/services/ssh.scm:160:4: 'ssh-daemon' requires 'networking'…
>>>
>>>      Trivial to implement, but the downside is that the user doesn’t
>>>      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'…
>>>        gnu/services/ssh.scm:117:30: … in extension of service 'shepherd'
>>>        gnu/services/ssh.scm:228:2: … while folding service 'lsh’ 
>>> instantiated here
>>>
>>>      The problem is that, currently, we’d get the location of the
>>>      (service …) form, which is in the ‘lsh-service’ procedure, in
>>>      gnu/services/ssh.scm.
>>>
>>>      It may be hard to come up with intelligible messages, and there’s 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 any 
> 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’re saying that, in addition to the error message, you’d
> like suggestions.

Yes!

> I like the idea.  However, in this specific case, I’m not sure how to
> achieve it: ‘guix system’ doesn’t know about all the Shepherd services
> that can possibly exist, so it cannot tell you that the ‘networking’ is
> provided if you add ‘dhcp-client-service’ or whatnot to your 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,
-- 
Jan Synáček



reply via email to

[Prev in Thread] Current Thread [Next in Thread]