Subject: Re: bug#45992: A "live" profile is missing

From: Leo Famulari <[email-masked]>
Date: Mon, 25 Jan 2021 14:54:50 -0500

On Mon, Jan 25, 2021 at 07:11:33PM +0100, Ludovic Courtès wrote:
> What does ‘grep ^localstatedir config.log’ return?

For my "master" and "staging" worktrees, it returns:
localstatedir='/var'

However, I've since done a full garbage collection and reconfigured, so
it doesn't really prove anything.

> So this is really weird.  AFAICS nothing has changed in this area.  You
> could try building a new profile generation and then run things like
> ‘guix gc --list-live’ to see if the profile (in /gnu/store) is there,
> and also ‘guix gc --list-roots’ to see if the profile itself (normally
> /var/guix/profiles/per-user/$USER/guix-profile) is listed.

--list-live actually starts by printing this:

------
$ guix gc --list-live
finding garbage collector roots...
skipping invalid root from `/var/guix/profiles/per-user/root/guix-profile-197-link' to `/gnu/store/1ph7vxq4hhqr1hjkmgin16p1cqx3v904-profile'
determining live/dead paths...
[... and then the paths are printed ...]
------

And --list-roots does include the bogus profile, exactly as described in
the warning from --list-live:

------
# guix gc --list-roots
/var/guix/profiles/per-user/root/current-guix-113-link
/var/guix/profiles/per-user/root/current-guix-109-link
/var/guix/profiles/per-user/root/current-guix-110-link
/var/guix/profiles/per-user/root/current-guix-111-link
/var/guix/profiles/per-user/root/current-guix-112-link
/var/guix/profiles/per-user/root/current-guix-113-link
/var/guix/profiles/per-user/root/guix-profile-196-link
/var/guix/profiles/per-user/root/guix-profile-192-link
/var/guix/profiles/per-user/root/guix-profile-193-link
/var/guix/profiles/per-user/root/guix-profile-194-link
/var/guix/profiles/per-user/root/guix-profile-195-link
/var/guix/profiles/per-user/root/guix-profile-196-link
/var/guix/profiles/per-user/root/guix-profile-197-link
/var/guix/profiles/per-user/leo/current-guix-152-link
/var/guix/profiles/per-user/leo/current-guix-147-link
/var/guix/profiles/per-user/leo/current-guix-148-link
/var/guix/profiles/per-user/leo/current-guix-149-link
/var/guix/profiles/per-user/leo/current-guix-150-link
/var/guix/profiles/per-user/leo/current-guix-151-link
/var/guix/profiles/per-user/leo/current-guix-152-link
/var/guix/profiles/per-user/leo/guix-profile-642-link
/var/guix/profiles/per-user/leo/guix-profile-631-link
/var/guix/profiles/per-user/leo/guix-profile-632-link
/var/guix/profiles/per-user/leo/guix-profile-633-link
/var/guix/profiles/per-user/leo/guix-profile-634-link
/var/guix/profiles/per-user/leo/guix-profile-635-link
/var/guix/profiles/per-user/leo/guix-profile-636-link
/var/guix/profiles/per-user/leo/guix-profile-637-link
/var/guix/profiles/per-user/leo/guix-profile-638-link
/var/guix/profiles/per-user/leo/guix-profile-639-link
/var/guix/profiles/per-user/leo/guix-profile-640-link
/var/guix/profiles/per-user/leo/guix-profile-641-link
/var/guix/profiles/per-user/leo/guix-profile-642-link
/var/guix/profiles/per-user/leo/current-guix-147-link
/home/leo/.cache/guix/inferiors/xme6psb4eddn2fvq262cxw6yxepo7reqzpkqf7r24hpemqkqddoq
/var/guix/profiles/per-user/leo/current-guix-152-link
/root/guix-profile-staging-1-link
/var/guix/profiles/per-user/root/current-guix-112-link
/var/guix/profiles/per-user/root/current-guix-109-link
/home/leo/.cache/guix/inferiors/erkfkimh2njpo5acqlz4ep5o6iihv3bgmfxpahltoityb3h5sguq
/var/guix/profiles/per-user/root/current-guix-111-link
/var/guix/profiles/per-user/leo/current-guix-150-link
/var/guix/profiles/per-user/root/current-guix-110-link
/var/guix/profiles/per-user/root/current-guix-113-link
/var/guix/profiles/per-user/leo/current-guix-148-link
/home/leo/.cache/guix/inferiors/jtzxrv5w2ppetxbu5sfxa45y36fjvgygksqu3uu7o36kizufmhta
/root/.config/guix/latest
/home/leo/.cache/guix/inferiors/xrlvjdtbkf6yqqcgwo34arbfpnb4lszopf7bcj4mq3etpl6dxbra
/var/guix/profiles/per-user/leo/current-guix-149-link
/var/guix/profiles/per-user/leo/current-guix-151-link
/var/guix/profiles
------

Regarding the suspicious "/root/guix-profile-staging-1-link", it's
leftover from testing the staging branch. I created it with `guix
pull --branch=staging --profile=/root/guix-profile-staging`.

And, it's time to delete /root/.config/guix/latest :)