Register content-addressability assertion for fixed outputs

This commit is contained in:
Eelco Dolstra 2017-02-24 16:39:53 +01:00
parent 1c718f80d3
commit e76df9bd52
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -2753,6 +2753,8 @@ void DerivationGoal::registerOutputs()
Path path = i.second.path; Path path = i.second.path;
if (missingPaths.find(path) == missingPaths.end()) continue; if (missingPaths.find(path) == missingPaths.end()) continue;
ValidPathInfo info;
Path actualPath = path; Path actualPath = path;
if (useChroot) { if (useChroot) {
actualPath = chrootRootDir + path; actualPath = chrootRootDir + path;
@ -2855,6 +2857,8 @@ void DerivationGoal::registerOutputs()
format("output path %1% has %2% hash %3% when %4% was expected") format("output path %1% has %2% hash %3% when %4% was expected")
% path % i.second.hashAlgo % printHash16or32(h2) % printHash16or32(h)); % path % i.second.hashAlgo % printHash16or32(h2) % printHash16or32(h));
} }
info.ca = makeFixedOutputCA(recursive, h2);
} }
/* Get rid of all weird permissions. This also checks that /* Get rid of all weird permissions. This also checks that
@ -2954,7 +2958,6 @@ void DerivationGoal::registerOutputs()
worker.markContentsGood(path); worker.markContentsGood(path);
} }
ValidPathInfo info;
info.path = path; info.path = path;
info.narHash = hash.first; info.narHash = hash.first;
info.narSize = hash.second; info.narSize = hash.second;