1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 15:31:47 +02:00

Merge branch 'ca-derivation-data-types' of github.com:obsidiansystems/nix into misc-ca

This commit is contained in:
John Ericson 2020-07-27 17:44:30 +00:00
commit 7cf978440c
31 changed files with 148 additions and 144 deletions

View file

@ -3730,7 +3730,7 @@ void DerivationGoal::registerOutputs()
[&](DerivationOutputFixed dof) {
outputHash = DerivationOutputFloating {
.method = dof.hash.method,
.hashType = *dof.hash.hash.type,
.hashType = dof.hash.hash.type,
};
},
[&](DerivationOutputFloating dof) {
@ -3811,8 +3811,10 @@ void DerivationGoal::registerOutputs()
time. The hash is stored in the database so that we can
verify later on whether nobody has messed with the store. */
debug("scanning for references inside '%1%'", path);
HashResult hash;
auto references = worker.store.parseStorePathSet(scanForReferences(actualPath, worker.store.printStorePathSet(referenceablePaths), hash));
// HashResult hash;
auto pathSetAndHash = scanForReferences(actualPath, worker.store.printStorePathSet(referenceablePaths));
auto references = worker.store.parseStorePathSet(pathSetAndHash.first);
HashResult hash = pathSetAndHash.second;
if (buildMode == bmCheck) {
if (!worker.store.isValidPath(worker.store.parseStorePath(path))) continue;
@ -5034,7 +5036,7 @@ bool Worker::pathContentsGood(const StorePath & path)
if (!pathExists(store.printStorePath(path)))
res = false;
else {
HashResult current = hashPath(*info->narHash.type, store.printStorePath(path));
HashResult current = hashPath(info->narHash->type, store.printStorePath(path));
Hash nullHash(htSHA256);
res = info->narHash == nullHash || info->narHash == current.first;
}