GNU bug report logs - #53658
guix shell cache not working properly

Previous Next

Package: guix;

Reported by: Guillaume Le Vaillant <glv <at> posteo.net>

Date: Mon, 31 Jan 2022 14:17:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53658 in the body.
You can then email your comments to 53658 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#53658; Package guix. (Mon, 31 Jan 2022 14:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillaume Le Vaillant <glv <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 31 Jan 2022 14:17:01 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: bug-guix <at> gnu.org
Subject: guix shell cache not working properly
Date: Mon, 31 Jan 2022 13:34:11 +0000
Hi,

With Guix at e217174b7b9046658ac3474d522bde192e9cffb4I have an issue
with the "guix shell -p ..." command, where I end up in a environment
for a profile I used previously instead of the profile specified in the
command line.

I can reproduce the issue this way:

--8<---------------cut here---------------start------------->8---
# Clear the profile cache
rm ${HOME}/.cache/guix/profiles/*

# Make some profiles
mkdir a
echo "(specifications->manifest '(\"gforth\"))" > a/manifest.scm
guix package -m a/manifest.scm -p a/profile
mkdir b
echo "(specifications->manifest '(\"smalltalk\"))" > b/manifest.scm
guix package -m b/manifest.scm -p b/profile

# The first attempt at using a profile when the cache is empty fails
guix shell -q -p a/profile -- gforth
> Backtrace:
>           10 (primitive-load "/home/guillaume/.config/guix/current/b…")
> In guix/ui.scm:
>    2209:7  9 (run-guix . _)
>   2172:10  8 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>   1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/status.scm:
>     802:4  6 (call-with-status-report _ _)
> In guix/scripts/environment.scm:
>    951:12  5 (_)
> In guix/store.scm:
>   2123:24  4 (run-with-store #f #<procedure 7f27d241c460 at guix/sc…> …)
> In guix/scripts/environment.scm:
>    968:16  3 (_ _)
> In guix/store.scm:
>   1995:38  2 (_ #f)
>    1473:0  1 (add-indirect-root #f "/home/guillaume/.cache/guix/prof…")
> In ice-9/boot-9.scm:
>   1685:16  0 (raise-exception _ #:continuable? _)
> 
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

# Then using the first profile with the same command works
guix shell -q -p a/profile -- gforth
> Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
bye

# Using the second profile doesn't work
guix shell -q -p b/profile -- gst
> guix shell: erreur : gst : commande introuvable
> conseil : Vouliez-vous dire « gforth » ?

# But the second profile really has the gst program
ls b/profile/bin
> gst  gst-blox  gst-browser  gst-config  gst-convert  [...]

# In fact, using the second profile creates an environment for
# the first profile
guix shell -q -p b/profile -- gforth
> Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
bye

# And the profile cache only contains a link for the first profile instead
# of links for both profiles
ls ${HOME}/.cache/guix/profiles/
> hw7txclxu45xzbt4orha5d6zrgjej5ps4ve5n6je3cnblbg7fz2a
> last-expiry-cleanup

ls hw7txclxu45xzbt4orha5d6zrgjej5ps4ve5n6je3cnblbg7fz2a/bin
> gforth  gforth-0.7.3  gforth-fast  gforth-fast-0.7.3  [...]
--8<---------------cut here---------------end--------------->8---




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 02 Mar 2022 18:31:02 GMT) Full text and rfc822 format available.

Notification sent to Guillaume Le Vaillant <glv <at> posteo.net>:
bug acknowledged by developer. (Wed, 02 Mar 2022 18:31:02 GMT) Full text and rfc822 format available.

Message #10 received at 53658-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 53658-done <at> debbugs.gnu.org
Subject: Re: bug#53658: guix shell cache not working properly
Date: Wed, 02 Mar 2022 19:30:12 +0100
Hi Guillaume,

Guillaume Le Vaillant <glv <at> posteo.net> skribis:

> # Clear the profile cache
> rm ${HOME}/.cache/guix/profiles/*
>
> # Make some profiles
> mkdir a
> echo "(specifications->manifest '(\"gforth\"))" > a/manifest.scm
> guix package -m a/manifest.scm -p a/profile
> mkdir b
> echo "(specifications->manifest '(\"smalltalk\"))" > b/manifest.scm
> guix package -m b/manifest.scm -p b/profile
>
> # The first attempt at using a profile when the cache is empty fails
> guix shell -q -p a/profile -- gforth
>> Backtrace:
>>           10 (primitive-load "/home/guillaume/.config/guix/current/b…")
>> In guix/ui.scm:
>>    2209:7  9 (run-guix . _)
>>   2172:10  8 (run-guix-command _ . _)
>> In ice-9/boot-9.scm:
>>   1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
>> In guix/status.scm:
>>     802:4  6 (call-with-status-report _ _)
>> In guix/scripts/environment.scm:
>>    951:12  5 (_)
>> In guix/store.scm:
>>   2123:24  4 (run-with-store #f #<procedure 7f27d241c460 at guix/sc…> …)
>> In guix/scripts/environment.scm:
>>    968:16  3 (_ _)
>> In guix/store.scm:
>>   1995:38  2 (_ #f)
>>    1473:0  1 (add-indirect-root #f "/home/guillaume/.cache/guix/prof…")
>> In ice-9/boot-9.scm:
>>   1685:16  0 (raise-exception _ #:continuable? _)
>> 
>> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
>
> # Then using the first profile with the same command works
> guix shell -q -p a/profile -- gforth
>> Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
>> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
>> Type `bye' to exit
> bye
>
> # Using the second profile doesn't work
> guix shell -q -p b/profile -- gst
>> guix shell: erreur : gst : commande introuvable
>> conseil : Vouliez-vous dire « gforth » ?
>
> # But the second profile really has the gst program
> ls b/profile/bin
>> gst  gst-blox  gst-browser  gst-config  gst-convert  [...]
>
> # In fact, using the second profile creates an environment for
> # the first profile
> guix shell -q -p b/profile -- gforth
>> Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
>> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
>> Type `bye' to exit
> bye

Fixed in ee6275c9744f8649bccc8cfa7c52d100044d7570, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 31 Mar 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.