From 9da367b7d5e7c71efd802b87c99c11faff141499 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Feb 2007 22:45:10 +0000 Subject: * `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. --- src/libstore/store-api.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 1f2d60f11cb6..8531eb040496 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -242,6 +242,11 @@ Path addPermRoot(const Path & storePath, const Path & gcRoot, bool indirect, bool allowOutsideRootsDir = false); +/* Sort a set of paths topologically under the references relation. + If p refers to q, then p follows q in this list. */ +Paths topoSortPaths(const PathSet & paths); + + /* For now, there is a single global store API object, but we'll purify that in the future. */ extern boost::shared_ptr store; -- cgit 1.4.1