mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
* 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.
This commit is contained in:
parent
5bcdc7e351
commit
93227ff65c
15 changed files with 95 additions and 89 deletions
|
|
@ -52,11 +52,11 @@ void printGCWarning()
|
|||
}
|
||||
|
||||
|
||||
void printMissing(const PathSet & paths)
|
||||
void printMissing(StoreAPI & store, const PathSet & paths)
|
||||
{
|
||||
unsigned long long downloadSize, narSize;
|
||||
PathSet willBuild, willSubstitute, unknown;
|
||||
queryMissing(paths, willBuild, willSubstitute, unknown, downloadSize, narSize);
|
||||
queryMissing(store, paths, willBuild, willSubstitute, unknown, downloadSize, narSize);
|
||||
|
||||
if (!willBuild.empty()) {
|
||||
printMsg(lvlInfo, format("these derivations will be built:"));
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue