[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
profile symlink structure
From: |
vapnik spaknik |
Subject: |
profile symlink structure |
Date: |
Sun, 24 May 2020 15:23:43 +0000 (UTC) |
Hi,
please could someone help me understand how guix organizes profile symlinks?
I can't find a full explanation anywhere.
So far I have figured out the following on my foreign distro:
- original profile directories are named like: /gnu/store/<UID>-profile
- /var/guix/profiles/per-user/<USR>/ contains symlinks to the profiles in
/gnu/store associated with user <USR>
- symlinks in /var/guix/profiles/per-user/<USR>/ seem to take one of the
following forms:
current-guix
current-guix-<N>-link
guix-profile
guix-profile-<N>-link
the ones with a number <N> in their name refer to the <N>th generation of a
profile with the same name apart from the <N>-link part.
- "guix-profile" is a symlink to the currently used generation for the profile
used by "guix package" for the user
- "current-guix" is a symlink to the currently used generation for the profile
used by "guix pull" for the user
- ~/.guix-profile is a symlink to the current profile used by "guix package",
i.e. /var/guix/profiles/per-user/<USR>/guix-profile
- ~/.config/guix/current is a symlink to the profile used by "guix pull"
Now this is where I'm confused.. I was expecting ~/.config/guix/current to link
to /var/guix/profiles/per-user/<USR>/current-guix where <USR> is the current
user. However, in my case it links to
/var/guix/profiles/per-user/root/current-guix, i.e. the profile for the root
user, even though there are several "current-guix" symlinks for <USR>, i.e.
links of the form /var/guix/profiles/per-user/<USR>/current-guix*.
Could this be due to running "sudo guix pull" or "sudo -i guix pull"?
Also, what determines which profile symlinks are placed in
/var/guix/gcroots/auto? I read elsewhere that these symlinks will be
automatically removed as soon as any of them are broken.
In my case that directory only contains symlinks to
/var/guix/profiles/per-user/*/current-guix* symlinks, one of which is missing
(/var/guix/profiles/per-user/root/current-guix-1-link), and there is another
link to ~/.config/guix/current-1-link which itself links directly to a profile
in /gnu/store
I suspect that the previously mentioned anomalies are the reason why "guix
pull" fails for me with the following error when run as <USR>:
> guix pull: error: symlink: File exists:
> "/var/guix/profiles/per-user/<USR>/current-guix-1-link"
and which may have been caused by interrupting a "guix pull".
I guess I can probably fix that problem by deleting current-guix-1-link, but I
would really like to know how the symlinking works exactly, so that I'm
prepared for potential future problems of this kind.
Thankyou,
Joe Bloggs
- profile symlink structure,
vapnik spaknik <=