diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-25T17·08+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-25T17·08+0000 |
commit | 066da4ab852ebe4288536149824ea175dc36cad4 (patch) | |
tree | d9258a2d224a0574c0135cd799cb704fc8c25433 /src/nix-store/main.cc | |
parent | c6290e42bc8890e2036013773a98e3551352c91a (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.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc index dc7a6de8b8ec..51e587255003 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); |