From 0565b5f2b35dc153dc98e1e3bd37476aa13ee4f1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 30 Nov 2006 22:43:55 +0000 Subject: * More remote operations. * Added new operation hasSubstitutes(), which is more efficient than querySubstitutes().size() > 0. --- src/libstore/misc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/misc.cc') diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 6849e2c1a64c..1319245c057c 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -64,7 +64,7 @@ void queryMissing(const PathSet & targets, for (DerivationOutputs::iterator i = drv.outputs.begin(); i != drv.outputs.end(); ++i) if (!store->isValidPath(i->second.path) && - store->querySubstitutes(i->second.path).size() == 0) + !store->hasSubstitutes(i->second.path)) mustBuild = true; if (mustBuild) { @@ -81,7 +81,7 @@ void queryMissing(const PathSet & targets, else { if (store->isValidPath(p)) continue; - if (store->querySubstitutes(p).size() > 0) + if (store->hasSubstitutes(p)) willSubstitute.insert(p); PathSet refs; store->queryReferences(p, todo); -- cgit 1.4.1