about summary refs log tree commit diff
path: root/src/libmain/shared.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-08-31T21·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-08-31T21·11+0000
commit93227ff65c73e726c4ceef0cdd9439e7a4301417 (patch)
treeba7b60ca132c373913dd4a1c42a900009aeb8a77 /src/libmain/shared.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/libmain/shared.hh')
-rw-r--r--src/libmain/shared.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh
index c99810c78a20..bd3d19531a80 100644
--- a/src/libmain/shared.hh
+++ b/src/libmain/shared.hh
@@ -24,11 +24,13 @@ namespace nix {
 
 MakeError(UsageError, nix::Error);
 
+class StoreAPI;
+
 /* Ugh.  No better place to put this. */
 Path makeRootName(const Path & gcRoot, int & counter);
 void printGCWarning();
 
-void printMissing(const PathSet & paths);
+void printMissing(StoreAPI & store, const PathSet & paths);
 
 template<class N> N getIntArg(const string & opt,
     Strings::iterator & i, const Strings::iterator & end)