about summary refs log tree commit diff
path: root/src/libstore/misc.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-06T11·21+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-06T11·21+0000
commitc8bfb11b34e4b8d3cfd714c54e7436c80e4d72ef (patch)
treea57b1c64bddaf7422e89031974f9c87f973c8a8b /src/libstore/misc.hh
parent7ba1fd2029c1290d89f0218157e597885926ca80 (diff)
* `nix-env (-i|-u) --dry-run' now shows exactly which missing paths
  will be built or substituted.

Diffstat (limited to 'src/libstore/misc.hh')
-rw-r--r--src/libstore/misc.hh32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/libstore/misc.hh b/src/libstore/misc.hh
new file mode 100644
index 000000000000..f758f5bfd58e
--- /dev/null
+++ b/src/libstore/misc.hh
@@ -0,0 +1,32 @@
+#ifndef __MISC_H
+#define __MISC_H
+
+#include "derivations.hh"
+
+
+/* Read a derivation, after ensuring its existence through
+   ensurePath(). */
+Derivation derivationFromPath(const Path & drvPath);
+
+/* Place in `paths' the set of all store paths in the file system
+   closure of `storePath'; that is, all paths than can be directly or
+   indirectly reached from it.  `paths' is not cleared.  If
+   `flipDirection' is true, the set of paths that can reach
+   `storePath' is returned; that is, the closures under the
+   `referrers' relation instead of the `references' relation is
+   returned. */
+void computeFSClosure(const Path & storePath,
+    PathSet & paths, bool flipDirection = false);
+
+/* Return the path corresponding to the output identifier `id' in the
+   given derivation. */
+Path findOutput(const Derivation & drv, string id);
+
+/* Given a set of paths that are to be built, return the set of
+   derivations that will be built, and the set of output paths that
+   will be substituted. */
+void queryMissing(const PathSet & targets,
+    PathSet & willBuild, PathSet & willSubstitute);
+
+
+#endif /* !__MISC_H */