[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is Guix garbage collector root aka gc root

From: Leo Famulari
Subject: Re: What is Guix garbage collector root aka gc root
Date: Sun, 13 Aug 2017 12:36:49 -0400
User-agent: Mutt/1.8.3 (2017-05-23)

On Sun, Aug 13, 2017 at 04:19:54PM +0300, Oleg Pykhalov wrote:
> I'm trying to understand what is “garbage collector root” aka “gc root”.

Garbage-collector roots (GC roots) are items in /gnu/store that are
registered to protect them from the garbage collector:

You can see the GC root symlinks in /var/guix/gcroots. You can make a
new GC root manually by adding a symlink to the store item you want to
preserve. For example:

$ ln --symbolic $(guix build hello) /var/guix/gcroots/my-hello

> 1. Is “$HOME/.guix-profile” a “gc root”?

Yes, this is mentioned in the manual, section Invoking guix package:

> 2. I need to build a package, but don't install it.  Just preserve it
> for offloading.  Is “guix build --root=$HOME/.guix-profile PACKAGE” (run
> as non root user) what I want?  Or if not, what FILE in “--root=FILE” do
> I need to pass?

I've never used this feature, so I'm not sure if the value of FILE can
be anywhere on the filesystem, or if it has to be in /var/guix/gcroots.
Hopefully someone else can clarify this. Or you can read the code or
experiment :)

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]