Circular dependency in gnu/services: mcron -> base -> admin -> mcron

  • Done
  • quality assurance status badge
Details
2 participants
  • Jack Hill
  • Ludovic Courtès
Owner
unassigned
Submitted by
Jack Hill
Severity
normal

Debbugs page

Jack Hill wrote 6 years ago
(address . bug-guix@gnu.org)
alpine.DEB.2.20.1906141136040.7537@marsh.hcoop.net
Hi Guix,

As discussed on IRC with LudoοΏ½ and Ricardo,
4252dace19945f56192477e8cb07973c20a526ba introduced a circular dependency
among gnu/services modules, by adding a dependency between from base ->
admin, resulting in the full dependency chain:

mcron -> base -> admin -> mcron

I ran into this when building a channel. The error reported by guix pull
was:

```
(repl-version 0 0)
(exception misc-error (value #f) (value "Unbound variable: ~s") (value (mcron-service-type)) (value #f))
```

LudoοΏ½ determined the full error was:

```
gnu/services/admin.scm:161:21: Unbound variable: mcron-service-type
```

by running the repl directly:

```
echo '(primitive-load "/gnu/store/vf892np8mnh2zx9dppcv9k25xk648n2d-inferior-script.scm")' \
| "/gnu/store/j7vxgnaqwimrzsnd8zhq9x1jdp7afl0s-guix-ca45da9fc/bin/guix" "repl"
```

Options for solving this problem include moving the guix-publish service
into another module. However, this would break the API of (gnu service base),
so we should be careful when doing that.

It doesn't look like guix-publish is used elsewhere in the Guix code
proper currently.

For now, we might want to revert 4252dace19945f56192477e8cb07973c20a526ba.

Best,
Jack
Ludovic Courtès wrote 6 years ago
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 36207-done@debbugs.gnu.org)
87d0jeajh4.fsf@gnu.org
Hi Jack,

Jack Hill <jackhill@jackhill.us> skribis:

Toggle quote (16 lines)
> As discussed on IRC with Ludo’ and Ricardo,
> 4252dace19945f56192477e8cb07973c20a526ba introduced a circular
> dependency among gnu/services modules, by adding a dependency between
> from base ->
> admin, resulting in the full dependency chain:
>
> mcron -> base -> admin -> mcron
>
> I ran into this when building a channel. The error reported by guix
> pull was:
>
> ```
> (repl-version 0 0)
> (exception misc-error (value #f) (value "Unbound variable: ~s") (value (mcron-service-type)) (value #f))
> ```

This is fixed (surprisingly easily!) by commit
f3d797005374e5333c7596fe86b4a524ab1b9b11.

Let me know if you notice anything wrong!

Thanks for the bug report,
Ludo’.
Closed
Jack Hill wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 36207-done@debbugs.gnu.org)
alpine.DEB.2.20.1906151620200.7537@marsh.hcoop.net
On Sat, 15 Jun 2019, Ludovic Courtès wrote:

Toggle quote (3 lines)
> This is fixed (surprisingly easily!) by commit
> f3d797005374e5333c7596fe86b4a524ab1b9b11.

Neat!

Toggle quote (2 lines)
> Let me know if you notice anything wrong!

Everything looks good and works well for me.

Toggle quote (2 lines)
> Thanks for the bug report,

Thanks for the quick fix.

Best,
Jack
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 36207@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36207
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help