On 2021-10-22 02:32, Oleg Pykhalov wrote:
Toggle quote (30 lines)
> Andrew Tropin <email@example.com> writes:
>> According to what I see in the shepherd tests:
>> and how it's implemented in home-shepherd:
>> It should work as you expect it.
> It doesn't.
>> Tried to do the following: I updated documentation field for a shepherd
>> service, reconfigured and it got loaded after I restarted a service.
>> ~ $ herd doc state
>> Init, update and maybe destroy state.
>> ~ $ herd restart state
>> Service state has been stopped.
>> Service state has been started.
>> ~ $ herd doc state
>> Really init, update and maybe destroy state.
>> Didn't check if start action gexp is updated too, but I expect it was.
> The start action is the interest, or configuration record, or service
From the experiment above it's clear that new configuration got loaded
and service record get updated after restart (at least one field of it).
Toggle quote (5 lines)
> (guix scripts system reconfigure) has a upgrade-shepherd-services
> procedure, which was created in 240b57f0ca576708ebf6cfa0dfe2803fa9ff2323
> and discussed in https://issues.guix.gnu.org/22039
The difference with update-shepherd-services is the usage of Shepherd
CLI in home service instead of Shepherd API in system service. So the
problem can hide somewhere around this part.
Automatic unloading in home-service doesn't happens and as I said it's
by design to prevent cases of losing unsaved work. However, it can be
implemented with an optional separate flag to shepherd configuration
record and extension to run-on-change-service or as it done in system
shepherd with the list of services, which doesn't have to be unloaded
Toggle quote (14 lines)
> [ The following text only describes how to reproduce the issue. ]
> When I tried to write goimapnotify service no changes applied after
> modifications in home-goimapnotify-shepherd-service  and , which
> are typical service-type and record. I didn't have similar issues with
> self-written system services.
> : https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4aae39ad9645c2d/dotfiles/guixsd/modules/home/services/mail.scm#L28-45
> : https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4aae39ad9645c2d/dotfiles/guixsd/home.scm#L40-65
I'm out of office for next 1.5 week, will check it when I come back.
Toggle quote (18 lines)
> Service extension also requires to unload service, e.g. mcron service
> extension in  and .
> : https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4aae39ad9645c2d/dotfiles/guixsd/modules/home/services/package-management.scm#L16-50
> : https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4aae39ad9645c2d/dotfiles/guixsd/home.scm#L154-161
> If I remove the guix-delete-generations service from home configuration,
> mcron job still exists according to 'herd schedule mcron'.
> --8<---------------cut here---------------start------------->8---
> (list (service guix-delete-generations-service-type ;; ...
> --8<---------------cut here---------------end--------------->8---
BTW, please remove unreviewed changes to interpose function, they are
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----