1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 14:32:42 +01:00

* Global configuration option `env-keep-derivations' to store pointer

to derivations in user environments.  Nice for developers (since it
  prevents build-time-only dependencies from being GC'ed, in
  conjunction with `gc-keep-outputs').  Turned off by default.
This commit is contained in:
Eelco Dolstra 2005-02-14 13:07:09 +00:00
parent b0aba6ec2a
commit 6a8ef36fe6
5 changed files with 72 additions and 35 deletions

View file

@ -306,7 +306,7 @@ void collectGarbage(GCAction action, PathSet & result)
{
result.clear();
string gcKeepOutputs = querySetting("gc-keep-outputs", "false");
bool gcKeepOutputs = queryBoolSetting("gc-keep-outputs", false);
/* Acquire the global GC root. This prevents
a) New roots from being added.
@ -330,7 +330,7 @@ void collectGarbage(GCAction action, PathSet & result)
for (PathSet::const_iterator i = roots.begin(); i != roots.end(); ++i)
computeFSClosure(canonPath(*i), livePaths);
if (gcKeepOutputs == "true") {
if (gcKeepOutputs) {
/* Hmz, identical to storePathRequisites in nix-store. */
for (PathSet::iterator i = livePaths.begin();
i != livePaths.end(); ++i)