1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-03 15:40:59 +01:00

Merge branch 'path-info' into ca-drv-exotic

This commit is contained in:
John Ericson 2023-04-01 16:40:32 -04:00
commit eeecfacb43
17 changed files with 191 additions and 135 deletions

View file

@ -2451,12 +2451,12 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
break;
}
},
}, outputHash.method);
}, outputHash.method.raw);
auto got = caSink.finish().first;
ValidPathInfo newInfo0 {
worker.store,
outputPathName(drv->name, outputName),
contentAddressFromMethodHashAndRefs(
ContentAddressWithReferences::fromParts(
outputHash.method,
std::move(got),
rewriteRefs()),
@ -2506,16 +2506,16 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
},
[&](const DerivationOutput::CAFixed & dof) {
auto wanted = getContentAddressHash(dof.ca);
auto wanted = dof.ca.getHash();
auto newInfo0 = newInfoFromCA(DerivationOutputCAFloating {
.method = getContentAddressMethod(dof.ca),
.method = dof.ca.getMethod(),
.hashType = wanted.type,
});
/* Check wanted hash */
assert(newInfo0.ca);
auto got = getContentAddressHash(*newInfo0.ca);
auto got = newInfo0.ca->getHash();
if (wanted != got) {
/* Throw an error after registering the path as
valid. */

View file

@ -97,7 +97,7 @@ void PathSubstitutionGoal::tryNext()
if (ca) {
subPath = sub->makeFixedOutputPathFromCA(
std::string { storePath.name() },
caWithoutRefs(*ca));
ContentAddressWithReferences::withoutRefs(*ca));
if (sub->storeDir == worker.store.storeDir)
assert(subPath == storePath);
} else if (sub->storeDir != worker.store.storeDir) {