about summary refs log tree commit diff
path: root/src/nix-env
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 91b82c0d09e6..f06f23dad523 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -211,9 +211,12 @@ static int comparePriorities(EvalState & state,
 
 static bool isPrebuilt(EvalState & state, const DrvInfo & elem)
 {
+    assert(false);
+#if 0
     return
         store->isValidPath(elem.queryOutPath(state)) ||
         store->hasSubstitutes(elem.queryOutPath(state));
+#endif
 }
 
 
@@ -931,8 +934,7 @@ static void opQuery(Globals & globals,
 
 
     /* Query which paths have substitutes. */
-    SubstitutablePathInfos subs;
-    PathSet validPaths;
+    PathSet validPaths, substitutablePaths;
     if (printStatus) {
         PathSet paths;
         foreach (vector<DrvInfo>::iterator, i, elems2)
@@ -943,7 +945,7 @@ static void opQuery(Globals & globals,
                 i->setFailed();
             }
         validPaths = store->queryValidPaths(paths);
-        store->querySubstitutablePathInfos(paths, subs);
+        substitutablePaths = store->querySubstitutablePaths(paths);
     }
 
     
@@ -969,7 +971,7 @@ static void opQuery(Globals & globals,
 
             if (printStatus) {
                 Path outPath = i->queryOutPath(globals.state);
-                bool hasSubs = subs.find(outPath) != subs.end();
+                bool hasSubs = substitutablePaths.find(outPath) != substitutablePaths.end();
                 bool isInstalled = installed.find(outPath) != installed.end();
                 bool isValid = validPaths.find(outPath) != validPaths.end();
                 if (xmlOutput) {