aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/misc.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-08-31 21:11:50 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-08-31 21:11:50 +0000
commit93227ff65c73e726c4ceef0cdd9439e7a4301417 (patch)
treeba7b60ca132c373913dd4a1c42a900009aeb8a77 /src/libstore/misc.hh
parent5bcdc7e3517e6d679cad1aaba41e4deb76d5a6e7 (diff)
* Eliminate all uses of the global variable ‘store’ from libstore.
This should also fix: nix-instantiate: ./../boost/shared_ptr.hpp:254: T* boost::shared_ptr<T>::operator->() const [with T = nix::StoreAPI]: Assertion `px != 0' failed. which was caused by hashDerivationModulo() calling the ‘store’ object (during store upgrades) before openStore() assigned it.
Diffstat (limited to 'src/libstore/misc.hh')
-rw-r--r--src/libstore/misc.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/misc.hh b/src/libstore/misc.hh
index abef6237e..850c12af4 100644
--- a/src/libstore/misc.hh
+++ b/src/libstore/misc.hh
@@ -9,7 +9,7 @@ namespace nix {
/* Read a derivation, after ensuring its existence through
ensurePath(). */
-Derivation derivationFromPath(const Path & drvPath);
+Derivation derivationFromPath(StoreAPI & store, 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
@@ -18,7 +18,7 @@ Derivation derivationFromPath(const Path & drvPath);
`storePath' is returned; that is, the closures under the
`referrers' relation instead of the `references' relation is
returned. */
-void computeFSClosure(const Path & storePath,
+void computeFSClosure(StoreAPI & store, const Path & storePath,
PathSet & paths, bool flipDirection = false,
bool includeOutputs = false);
@@ -29,7 +29,7 @@ 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,
+void queryMissing(StoreAPI & store, const PathSet & targets,
PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown,
unsigned long long & downloadSize, unsigned long long & narSize);