daemon: Factorize substituter agent spawning.
authorLudovic Courtès <ludo@gnu.org>
Tue, 1 Dec 2020 14:55:57 +0000 (15:55 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 8 Dec 2020 21:30:08 +0000 (22:30 +0100)
commita618a8c6203d4cf57f12873a86797b8685b11e14
treeb7b6eec5c5f387ccbaa8dfcd0859fa50047e6c8d
parent79c6614f58a57b985daf8940766319e440311db0
daemon: Factorize substituter agent spawning.

* nix/libstore/local-store.hh (class LocalStore)[substituter]: New
method.
[runningSubstituter]: Turn into a shared_ptr.
* nix/libstore/local-store.cc (LocalStore::querySubstitutablePaths):
Call 'substituter' instead of using inline code.
(LocalStore::querySubstitutablePathInfos): Likewise.
(LocalStore::substituter): New method.
nix/libstore/local-store.cc
nix/libstore/local-store.hh