From 03427e76f11fe1d918020d28bdb69b2fb348ee96 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Aug 2008 11:44:50 +0000 Subject: * querySubstitutablePathInfo: work properly when run via the daemon. * --dry-run: print the paths that we don't know how to build/substitute. --- src/libstore/misc.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/libstore/misc.cc') diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index acf9346d4bdc..1759f521cc29 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -46,7 +46,7 @@ Path findOutput(const Derivation & drv, string id) void queryMissing(const PathSet & targets, - PathSet & willBuild, PathSet & willSubstitute) + PathSet & willBuild, PathSet & willSubstitute, PathSet & unknown) { PathSet todo(targets.begin(), targets.end()), done; @@ -57,7 +57,10 @@ void queryMissing(const PathSet & targets, done.insert(p); if (isDerivation(p)) { - if (!store->isValidPath(p)) continue; + if (!store->isValidPath(p)) { + unknown.insert(p); + continue; + } Derivation drv = derivationFromPath(p); bool mustBuild = false; @@ -81,12 +84,11 @@ void queryMissing(const PathSet & targets, else { if (store->isValidPath(p)) continue; SubstitutablePathInfo info; - if (dynamic_cast(store.get())->querySubstitutablePathInfo(p, info)) { + if (store->querySubstitutablePathInfo(p, info)) { willSubstitute.insert(p); todo.insert(info.references.begin(), info.references.end()); - } - /* Not substitutable and not buildable; should we flag - this? */ + } else + unknown.insert(p); } } } -- cgit 1.4.1