Andreas Enge <andr...@enge.fr> skribis: > I simply applied the patch, and it seems to be part of the solution. > Upon a first run of "guix-package --list-available", I obtained the error > message inviting me to create the directory, which I did. The next call > succeeded. But now $HOME/.guix-profile points to the non-existing > /usr/local/guix-git/var/nix/profiles/per-user/privat/guix-profile, and I > get the error:
[...] > ?: 0 [symlink "/usr/local/guix-git/var/nix/profiles/per- > user/privat/guix-profile" ...] > > ERROR: In procedure symlink: > ERROR: In procedure symlink: File exists Aah, I see. That’s because it did (file-exists? ".guix-profile"), but this uses stat(2). So here, because .guix-profile was a dangling symlink, it returned #f, even though the symlink actually existed. I fixed it using ‘lstat’ instead. [...] > I would suggest the following: Before making the $HOME/.guix-profile > symlink, check for the guix-profile symlink in the per-user profile > directory. If it does not exist, create it as a link to the empty user > environment. So there will always be guix-profile-1-link linking to the > empty directory, which might also be useful for roll back (never delete > this first empty environment). Having this empty user environment on disk should not be needed because internally, ‘profile-manifests’ explicitly checks whether the profile exists, and returns an empty manifest if it doesn’t. So I’m committing the patch, minus the above bug. Thanks for the very quick feedback! Ludo’.