guix-devel
[Top][All Lists]
Advanced

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

Protecting prerequisites from GC


From: Ludovic Courtès
Subject: Protecting prerequisites from GC
Date: Fri, 07 Feb 2014 00:01:00 +0100
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Hello,

On popular demand ;-), commit 6e37066 finally exposes the daemon’s
--gc-keep-derivations and --gc-keep-outputs options, which control
exactly what the daemon will reclaim (see documentation below.)  The
commit is small, because that functionality was already present in the
Nix daemon, just not exposed in guix-daemon.

The idea is that on a developer’s machine the daemon would run with
--gc-keep-outputs (and --gc-keep-derivations, which is the default.)

I think this addresses a longstanding inconvenience, where running the
GC would delete all the build tools and sources, unless they happened to
be live.

Comments welcome.

Ludo’.


‘--gc-keep-outputs[=yes|no]’
     Tell whether the garbage collector (GC) must keep outputs of live
     derivations.

     When set to “yes”, the GC will keep the outputs of any live
     derivation available in the store—the ‘.drv’ files.  The default is
     “no”, meaning that derivation outputs are kept only if they are GC
     roots.

‘--gc-keep-derivations[=yes|no]’
     Tell whether the garbage collector (GC) must keep derivations
     corresponding to live outputs.

     When set to “yes”, as is the case by default, the GC keeps
     derivations—i.e., ‘.drv’ files—as long as at least one of their
     outputs is live.  This allows users to keep track of the origins of
     items in their store.  Setting it to “no” saves a bit of disk
     space.

     Note that when both ‘--gc-keep-derivations’ and ‘--gc-keep-outputs’
     are used, the effect is to keep all the build prerequisites (the
     sources, compiler, libraries, and other build-time tools) of live
     objects in the store, regardless of whether these prerequisites are
     live.  This is convenient for developers since it saves rebuilds or
     downloads.



reply via email to

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