bug#48368: bug#47172: Shepherd 0.8.1 tests fail on core-updates

Marius Bakke <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Ludovic Courtès <[email protected]> skriver:

> Ludovic Courtès <[email protected]> skribis:
>
>> This turns out to be due to a… miscompilation bug.
>>
>> In (shepherd scripts herd), ‘run-command’ has this code:
>>
>>   (let ((sock    (open-connection socket-file))
>>         (action* (if (and (eq? action 'detailed-status)
>>                           (memq service '(root shepherd)))
>>                      'status
>>                      action)))
>>     …)
>>
>> Problem is that everything works as if (eq? action 'detailed-status)
>> was omitted, such that ‘herd stop root’ is interpreted as ‘herd status
>> root’.
>
> A workaround that works with 3.0.7 is swapping the two ‘and’
> sub-expressions:
>
> diff --git a/modules/shepherd/scripts/herd.scm b/modules/shepherd/scripts/herd.scm
> index 106de1e..39d2e34 100644
> --- a/modules/shepherd/scripts/herd.scm
> +++ b/modules/shepherd/scripts/herd.scm
> @@ -126,8 +126,8 @@ of pairs."
>  the daemon via SOCKET-FILE."
>    (with-system-error-handling
>     (let ((sock    (open-connection socket-file))
> -         (action* (if (and (eq? action 'detailed-status)
> -                           (memq service '(root shepherd)))
> +         (action* (if (and (memq service '(root shepherd))
> +                           (eq? action 'detailed-status))
>                        'status
>                        action)))
>       ;; Send the command.

Cc'ing the relevant Guile bug:

  https://bugs.gnu.org/48368

See also commit 79be6a985799adc6d663890250f4fb7c12f015b4 on
'core-updates' that builds with -O1 as a less satisfactory workaround.
signature.asc (application/pgp-signature, 247 B)
-----BEGIN PGP SIGNATURE-----

iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYKpzhA8cbWFyaXVzQGdu
dS5vcmcACgkQ6HGLpZEUEHd0CgD9FsWiNMu2PxB/773BI2hOmYPKZqyX+KbAy05R
C7+xubIBAPcyjBy9TtmqfG0aCSUu1r6a8dmFKkJm4r4eb5fLEwEK
=o7Sr
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.