aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25 17:08:52 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25 17:08:52 +0000
commit066da4ab852ebe4288536149824ea175dc36cad4 (patch)
treed9258a2d224a0574c0135cd799cb704fc8c25433 /src/nix-store/main.cc
parentc6290e42bc8890e2036013773a98e3551352c91a (diff)
* Really fix the substitute mechanism, i.e., ensure the closure
invariant by registering references through the manifest. * Added a test for nix-pull.
Diffstat (limited to 'src/nix-store/main.cc')
-rw-r--r--src/nix-store/main.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index dc7a6de8b..51e587255 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -177,19 +177,27 @@ static void opSubstitute(Strings opFlags, Strings opArgs)
while (1) {
Path srcPath;
Substitute sub;
+ PathSet references;
getline(cin, srcPath);
if (cin.eof()) break;
getline(cin, sub.program);
string s;
- getline(cin, s);
int n;
+ getline(cin, s);
if (!string2Int(s, n)) throw Error("number expected");
while (n--) {
getline(cin, s);
sub.args.push_back(s);
}
+ getline(cin, s);
+ if (!string2Int(s, n)) throw Error("number expected");
+ while (n--) {
+ getline(cin, s);
+ references.insert(s);
+ }
if (!cin || cin.eof()) throw Error("missing input");
subPairs.push_back(pair<Path, Substitute>(srcPath, sub));
+ setReferences(txn, srcPath, references);
}
registerSubstitutes(txn, subPairs);