diff options
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/profiles.cc | 6 | ||||
-rw-r--r-- | src/libstore/profiles.hh | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc index 6862b42f0..e91dd781e 100644 --- a/src/libstore/profiles.cc +++ b/src/libstore/profiles.cc @@ -72,7 +72,7 @@ static void makeName(const Path & profile, GenerationNumber num, } -Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath) +Path createGeneration(ref<LocalFSStore> store, Path profile, StorePath outPath) { /* The new generation number should be higher than old the previous ones. */ @@ -82,7 +82,7 @@ Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath) if (gens.size() > 0) { Generation last = gens.back(); - if (readLink(last.path) == outPath) { + if (readLink(last.path) == store->printStorePath(outPath)) { /* We only create a new generation symlink if it differs from the last one. @@ -105,7 +105,7 @@ Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath) user environment etc. we've just built. */ Path generation; makeName(profile, num + 1, generation); - store->addPermRoot(store->parseStorePath(outPath), generation, false, true); + store->addPermRoot(outPath, generation, false, true); return generation; } diff --git a/src/libstore/profiles.hh b/src/libstore/profiles.hh index abe507f0e..be55a65d4 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/profiles.hh @@ -8,6 +8,8 @@ namespace nix { +class StorePath; + typedef unsigned int GenerationNumber; @@ -28,7 +30,7 @@ std::pair<Generations, std::optional<GenerationNumber>> findGenerations(Path pro class LocalFSStore; -Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath); +Path createGeneration(ref<LocalFSStore> store, Path profile, StorePath outPath); void deleteGeneration(const Path & profile, GenerationNumber gen); |