diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-12T22·49-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-12T22·49-0400 |
commit | 4fca02077c4cdea13d32b4665e817460f6502726 (patch) | |
tree | 4a1d8efa937a4a62ea68c04a2fecdb473ad1a343 /tests | |
parent | 479e9172b3583cedcada90ed193cab156cdc56b5 (diff) |
Handle gc-keep-outputs and gc-keep-derivations both enabled
If the options gc-keep-outputs and gc-keep-derivations are both enabled, you can get a cycle in the liveness graph. There was a hack to handle this, but it didn't work with multiple-output derivations, causing the garbage collector to fail with errors like ‘error: cannot delete path `...' because it is in use by `...'’. The garbage collector now handles strongly connected components in the liveness graph as a unit and decides whether to delete all or none of the paths in an SCC.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/multiple-outputs.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/multiple-outputs.sh b/tests/multiple-outputs.sh index 07276bb66681..29af691ead6f 100644 --- a/tests/multiple-outputs.sh +++ b/tests/multiple-outputs.sh @@ -55,4 +55,6 @@ if nix-build multiple-outputs.nix -A cyclic --no-out-link; then fi echo "collecting garbage..." -nix-store --gc +rm $TEST_ROOT/result* +nix-store --gc --option gc-keep-derivations true --option gc-keep-outputs true +nix-store --gc --print-roots |