1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

* 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.
This commit is contained in:
Eelco Dolstra 2008-08-02 12:54:35 +00:00
parent fc691e1cbd
commit 3c92ea399d
14 changed files with 338 additions and 272 deletions

View file

@ -1,5 +1,6 @@
#include "misc.hh"
#include "store-api.hh"
#include "local-store.hh"
#include <aterm2.h>
@ -79,10 +80,13 @@ void queryMissing(const PathSet & targets,
else {
if (store->isValidPath(p)) continue;
if (store->hasSubstitutes(p))
SubstitutablePathInfo info;
if (dynamic_cast<LocalStore *>(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? */
}
}
}