GNU bug report logs - #77109
[feature] [shepherd] Accept multiple services for actions

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 19 Mar 2025 06:04:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 77109 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: bug#77109: [feature] [shepherd] Accept multiple services for actions
Date: Fri, 21 Mar 2025 23:53:08 +0100
Tomas Volf <~@wolfsden.cz> skribis:

> Actually, now that I think about it, why are formal arguments for the
> restart lambda `(running . args)'?  For example status has just `(_)'.
> Neither `running' nor `args' are used in the lambda itself.
>
> Changing the formal arguments to simply _ would get us the same behavior
> you get when you try to invoke e.g. status action with multiple
> arguments (an error).

I think it’s a bug.  Back in the day (commit
a84ecf34be2a35e8b068d4232d8932acc5986c33) would pass those extra
arguments to ‘start’:

--8<---------------cut here---------------start------------->8---
      ((restart)
       (lambda (running . args)
         (if running
             (stop obj)
             (local-output "~a was not running." (canonical-name obj)))
         (start obj args)))
--8<---------------cut here---------------end--------------->8---

Which is consistent and should probably be restored.

That way, we’d get an error when restarting services that take no
arguments.

Ludo’.




This bug report was last modified 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.