From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: delete profile Date: Thu, 16 Mar 2017 12:13:48 +0300 Message-ID: <87var91t4j.fsf@gmail.com> References: <87y3waqua6.fsf@lupo.i-did-not-set--mail-host-address--so-tickle-me> <877f3t9dgj.fsf@gmail.com> <20170314055518.GA12348@mail.thebird.nl> <87pohkaq57.fsf@gmail.com> <20170314151844.GB15269@mail.thebird.nl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coRTh-0002CJ-Je for guix-devel@gnu.org; Thu, 16 Mar 2017 05:13:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coRTg-0004Lp-2F for guix-devel@gnu.org; Thu, 16 Mar 2017 05:13:49 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:32939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1coRTf-0004L7-Rl for guix-devel@gnu.org; Thu, 16 Mar 2017 05:13:48 -0400 Received: by mail-lf0-x22a.google.com with SMTP id a6so17367570lfa.0 for ; Thu, 16 Mar 2017 02:13:47 -0700 (PDT) In-Reply-To: <20170314151844.GB15269@mail.thebird.nl> (Pjotr Prins's message of "Tue, 14 Mar 2017 15:18:44 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pjotr Prins Cc: guix-devel@gnu.org 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