mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
If gc-keep-derivations is set, only keep the actual deriver
This prevents zillions of derivations from being kept, and fixes an infinite recursion in the garbage collector (due to an obscure cycle that can occur with fixed-output derivations).
This commit is contained in:
parent
fbf0b2fa45
commit
e775d4d84f
1 changed files with 1 additions and 1 deletions
|
@ -473,7 +473,7 @@ bool LocalStore::tryToDelete(GCState & state, const Path & path)
|
||||||
if (state.gcKeepDerivations && isDerivation(p)) {
|
if (state.gcKeepDerivations && isDerivation(p)) {
|
||||||
PathSet outputs = queryDerivationOutputs(p);
|
PathSet outputs = queryDerivationOutputs(p);
|
||||||
foreach (PathSet::iterator, i, outputs)
|
foreach (PathSet::iterator, i, outputs)
|
||||||
if (isValidPath(*i)) todo.insert(*i);
|
if (isValidPath(*i) && queryDeriver(*i) == p) todo.insert(*i);
|
||||||
}
|
}
|
||||||
/* If gc-keep-outputs is set, then don't delete this path
|
/* If gc-keep-outputs is set, then don't delete this path
|
||||||
if there are derivers of this path that are not
|
if there are derivers of this path that are not
|
||||||
|
|
Loading…
Reference in a new issue