From b07167be5aeb91c06ca3487b3d18f6c8f59942a0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 3 Sep 2020 11:12:38 +0200 Subject: [PATCH] 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. --- src/libstore/profiles.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index e91dd781e..9b114f030 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -105,7 +105,7 @@ Path createGeneration(ref store, Path profile, StorePath outPath) user environment etc. we've just built. */ Path generation; makeName(profile, num + 1, generation); - store->addPermRoot(outPath, generation, false, true); + store->addPermRoot(outPath, generation, true); return generation; }