From 97990235454f0aa19b793c74c8f7fd8b7da3001b Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Wed, 18 Feb 2026 13:56:05 +1100 Subject: [PATCH] LocalStore: stop creating outdated profiles symlink The gcroots/profiles link became outdated in aeb810b01e17d040f9592681ee271f15874dce50 when the GC code started reading directly from /profiles, and gcroots/profiles was even partially deleted in that commit. --- docker.nix | 1 - src/libstore/local-store.cc | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docker.nix b/docker.nix index 32205224b73..d85927a0802 100644 --- a/docker.nix +++ b/docker.nix @@ -358,7 +358,6 @@ dockerTools.buildLayeredImageWithNixDb { extraCommands = '' rm -rf nix-support - ln -s /nix/var/nix/profiles nix/var/nix/gcroots/profiles ''; fakeRootCommands = '' chmod 1777 tmp diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index cdddcefcc07..9de8bf496df 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -144,10 +144,7 @@ LocalStore::LocalStore(ref config) Path gcRootsDir = config->stateDir + "/gcroots"; const auto & localSettings = config->getLocalSettings(); const auto & gcSettings = localSettings.getGCSettings(); - if (!pathExists(gcRootsDir)) { - createDirs(gcRootsDir); - replaceSymlink(profilesDir, gcRootsDir + "/profiles"); - } + createDirs(gcRootsDir); for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) { createDirs(perUserDir);