Pjotr Prins (2017-03-14 15:18 +0000) wrote: > On Tue, Mar 14, 2017 at 05:28:52PM +0300, Alex Kost wrote: >> No, "$HOME/guix-test-profile" was not a symlink to >> "/var/guix/profiles/...". Try this: > > Hmmm. You are right. ~/.guix-profile, meanwile, does point inside > /var/guix.
Yes, "~/.guix-profile" is the only "special" profile that uses this additional level of symlinking. Profiles that you create with "guix package -p ... -i ..." always point directly to store. > I have wondered before how GC works on profiles not in /var/guix. > > Where does it store that state? In the database? As Ludovic wrote, the links to the created profile generations are put in "/var/guix/gcroots/auto" and "guix gc" does not clear the store of these "registered gc roots". > I mean, if I simply > remove the symlink > > lrwxrwxrwx 1 wrk 502 51 Feb 19 09:38 guix-build-system-1-link -> > /gnu/store/0lyv2p35ziymd6xjrfxy8sp502n2ii5d-profile > > how does Guix know it can GC > /gnu/store/0lyv2p35ziymd6xjrfxy8sp502n2ii5d-profile? After you remove "foo-1-link", the according link in "/var/guix/gcroots/auto" will become dead, so "guix gc" will remove it and will clear the store of that profile. -- Alex