1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 18:41:47 +02:00

* Really fix the substitute mechanism, i.e., ensure the closure

invariant by registering references through the manifest.
* Added a test for nix-pull.
This commit is contained in:
Eelco Dolstra 2005-01-25 17:08:52 +00:00
parent c6290e42bc
commit 066da4ab85
16 changed files with 255 additions and 89 deletions

View file

@ -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);