about summary refs log tree commit diff
path: root/src/nix-store
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25T20·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25T20·27+0000
commit2a2756b85643de6355b7b9e3cc47574e7df82303 (patch)
tree1e44145bc88c55f6d70b05503b7741a613b36e3c /src/nix-store
parenta9340fa67222bf7ab9057d132af387031b00997d (diff)
* Simplification: registerSubstitutes -> registerSubstitute. We no
  longer need the former since there we no longer have the
  substitutes-rev table (which triggered a O(n^2) cost in updating
  them).

Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/main.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index 51e5872550..ed93f20657 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -170,7 +170,6 @@ static void opSubstitute(Strings opFlags, Strings opArgs)
     if (!opArgs.empty())
         throw UsageError("no arguments expected");
 
-    SubstitutePairs subPairs;
     Transaction txn;
     createStoreTransaction(txn);
 
@@ -196,12 +195,10 @@ static void opSubstitute(Strings opFlags, Strings opArgs)
             references.insert(s);
         }
         if (!cin || cin.eof()) throw Error("missing input");
-        subPairs.push_back(pair<Path, Substitute>(srcPath, sub));
+        registerSubstitute(txn, srcPath, sub);
         setReferences(txn, srcPath, references);
     }
 
-    registerSubstitutes(txn, subPairs);
-    
     txn.commit();
 }