guix shell cache doesn't consider grafts

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
important
M
M
Maxim Cournoyer wrote on 25 Jul 2023 15:55
(name . bug-guix)(address . bug-guix@gnu.org)
87h6ps2j05.fsf@gmail.com
Hello,

While investigating https://issues.guix.gnu.org/64836,I discovered that
the cache of 'guix shell' doesn't take into account grafts for
subsequent invocations.

Consider, using Guix at commit 21b718f4d6c3ded8ef50d12f6e9ae6474f74620f:

Toggle snippet (13 lines)
$ guix build gtk+
/gnu/store/6vqx7nip7r95h2nhvhb9vxzjpri581b9-gtk+-3.24.37

$ guix build --no-grafts gtk+
/gnu/store/2n2kprz35a19ibs5kbjsb3k4cdl69q2w-gtk+-3.24.37

$ guix shell gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/6vqx7nip7r95h2nhvhb9vxzjpri581b9-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32

$ guix shell --no-grafts gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/6vqx7nip7r95h2nhvhb9vxzjpri581b9-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32

The 'guix shell --no-grafts' invocation simply reused the same cache as
the previous command, so grafts are in use, which is non-intuitive. The
reverse would be true as well:

Toggle snippet (7 lines)
$ guix shell --rebuild-cache --no-grafts gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/2n2kprz35a19ibs5kbjsb3k4cdl69q2w-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32

$ guix shell gtk+ -- sh -c 'realpath $GUIX_ENVIRONMENT/lib/libgtk-3.so'
/gnu/store/2n2kprz35a19ibs5kbjsb3k4cdl69q2w-gtk+-3.24.37/lib/libgtk-3.so.0.2405.32

The ungrafted cache got reused by the invocation that should have used
grafted inputs.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 12 Oct 2023 17:43
control message for bug #64856
(address . control@debbugs.gnu.org)
871qdzlucd.fsf@gnu.org
severity 64856 important
quit
L
L
Ludovic Courtès wrote on 12 Oct 2023 18:57
Re: bug#64856: guix shell cache doesn't consider grafts
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 64856-done@debbugs.gnu.org)
87wmvrkcda.fsf@gnu.org
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (4 lines)
> While investigating https://issues.guix.gnu.org/64836,I discovered that
> the cache of 'guix shell' doesn't take into account grafts for
> subsequent invocations.

Fixed in 75bdf8e06a325b90bf387a03f88726d338acbbf6.

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 64856
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