From: vapnik spaknik <vapniks@yahoo.com>
To: help-guix@gnu.org
Subject: profile symlink structure
Date: Sun, 24 May 2020 15:23:43 +0000 (UTC) [thread overview]
Message-ID: <981904032.4122292.1590333823170@mail.yahoo.com> (raw)
In-Reply-To: 981904032.4122292.1590333823170.ref@mail.yahoo.com
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
next parent reply other threads:[~2020-05-24 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <981904032.4122292.1590333823170.ref@mail.yahoo.com>
2020-05-24 15:23 ` vapnik spaknik [this message]
2020-05-25 8:03 ` profile symlink structure Pierre Neidhardt
2020-05-25 17:14 ` vapnik spaknik via
2020-05-26 7:22 ` Pierre Neidhardt
2020-05-25 22:04 ` vapnik spaknik via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=981904032.4122292.1590333823170@mail.yahoo.com \
--to=vapniks@yahoo.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).