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:
parent
c6290e42bc
commit
066da4ab85
16 changed files with 255 additions and 89 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue