Merge pull request #6925 from pennae/fod-register-memory
don't read outputs into memory for output rewriting
This commit is contained in:
commit
d5e979ab87
|
@ -2374,10 +2374,8 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
|
||||||
if (*scratchPath != finalPath) {
|
if (*scratchPath != finalPath) {
|
||||||
// Also rewrite the output path
|
// Also rewrite the output path
|
||||||
auto source = sinkToSource([&](Sink & nextSink) {
|
auto source = sinkToSource([&](Sink & nextSink) {
|
||||||
StringSink sink;
|
|
||||||
dumpPath(actualPath, sink);
|
|
||||||
RewritingSink rsink2(oldHashPart, std::string(finalPath.hashPart()), nextSink);
|
RewritingSink rsink2(oldHashPart, std::string(finalPath.hashPart()), nextSink);
|
||||||
rsink2(sink.s);
|
dumpPath(actualPath, rsink2);
|
||||||
rsink2.flush();
|
rsink2.flush();
|
||||||
});
|
});
|
||||||
Path tmpPath = actualPath + ".tmp";
|
Path tmpPath = actualPath + ".tmp";
|
||||||
|
|
Loading…
Reference in a new issue