From 3c92ea399d717dc45b3fa91424c0dadc0239ebf2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 2 Aug 2008 12:54:35 +0000 Subject: * Make nix-env --dry-run print the paths to be substituted correctly again. (After the previous substituter mechanism refactoring I didn't update the code that obtains the references of substitutable paths.) This required some refactoring: the substituter programs are now kept running and receive/respond to info requests via stdin/stdout. --- src/libstore/misc.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libstore/misc.cc') diff --git a/src/libstore/misc.cc b/src/libstore/misc.cc index 4b192ec9a0d9..acf9346d4bdc 100644 --- a/src/libstore/misc.cc +++ b/src/libstore/misc.cc @@ -1,5 +1,6 @@ #include "misc.hh" #include "store-api.hh" +#include "local-store.hh" #include @@ -79,10 +80,13 @@ void queryMissing(const PathSet & targets, else { if (store->isValidPath(p)) continue; - if (store->hasSubstitutes(p)) + SubstitutablePathInfo info; + if (dynamic_cast(store.get())->querySubstitutablePathInfo(p, info)) { willSubstitute.insert(p); - // XXX call the substituters - // store->queryReferences(p, todo); + todo.insert(info.references.begin(), info.references.end()); + } + /* Not substitutable and not buildable; should we flag + this? */ } } } -- cgit 1.4.1