diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-21 22:45:10 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-21 22:45:10 +0000 |
commit | 9da367b7d5e7c71efd802b87c99c11faff141499 (patch) | |
tree | 211ee4b64462765ffe10e587981ce61ca473c616 /src/libstore/gc.cc | |
parent | 881feb96987dace75f983c16fec1013b70602d4f (diff) |
* `nix-store -qR' and friends: print the paths sorted topologically
under the references relation. This is useful for commands that
want to copy paths to another Nix store in the right order.
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index fa3b84b7a..2c75b16f6 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -417,7 +417,7 @@ static void dfsVisit(const PathSet & paths, const Path & path, } -static Paths topoSort(const PathSet & paths) +Paths topoSortPaths(const PathSet & paths) { Paths sorted; PathSet visited; @@ -550,7 +550,7 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete, which things can be deleted safely. */ /* !!! when we have multiple output paths per derivation, this will not work anymore because we get cycles. */ - Paths storePaths = topoSort(storePathSet); + Paths storePaths = topoSortPaths(storePathSet); /* Try to delete store paths in the topologically sorted order. */ for (Paths::iterator i = storePaths.begin(); i != storePaths.end(); ++i) { |