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


Message #8 received at 77109 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 77109 <at> debbugs.gnu.org
Subject: Re: bug#77109: [feature] [shepherd] Accept multiple services for
 actions
Date: Wed, 19 Mar 2025 14:00:12 +0100
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hi,
>
> Coming from a world where 'guix install package1 package2 ...' is a thing, I
> sometimes would like to be able to do:
>
> herd restart service1 service2 ...
>
> Which Shepherd gladly accepts but disregarding service2 ...
>
> Would it be a good idea to teach the Shepherd how to do this?

I guess it could be special-cased for start, stop, restart, since these
three do not take (by default) any arguments (I *think* you can make
`start' procedure taking arguments?  I have never tried.).  But for
general case, the `service2' is passed as an argument to the action
`restart' of service `service1'.

I am not sure having different semantics for restart and any other
action is a good idea though.

But what I think would be a good idea is for start, stop, restart to
signal an error when additional unexpected arguments are provided.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

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.