createGeneration(): Always create an indirect root
This means profiles outside of /nix/var/nix/profiles don't get garbage-collected. It also means we don't need to scan /nix/var/nix/profiles for GC roots anymore, except for compatibility with previously existing generations.
This commit is contained in:
parent
b74f5cdd23
commit
b07167be5a
|
@ -105,7 +105,7 @@ Path createGeneration(ref<LocalFSStore> store, Path profile, StorePath outPath)
|
||||||
user environment etc. we've just built. */
|
user environment etc. we've just built. */
|
||||||
Path generation;
|
Path generation;
|
||||||
makeName(profile, num + 1, generation);
|
makeName(profile, num + 1, generation);
|
||||||
store->addPermRoot(outPath, generation, false, true);
|
store->addPermRoot(outPath, generation, true);
|
||||||
|
|
||||||
return generation;
|
return generation;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue