diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-27 17:44:30 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-27 17:47:40 +0000 |
commit | 7cf978440c62b6677b068f10ee7ef22a09e7b1b8 (patch) | |
tree | d87cb0613cf9210c467e39136c6b3cec25736fb4 /src/libstore/build.cc | |
parent | 387699fe7ff3fafca879843327843845fd8229d0 (diff) | |
parent | e6115ca00453d0e6ff653634133b547f7b3f552d (diff) |
Merge branch 'ca-derivation-data-types' of github.com:obsidiansystems/nix into misc-ca
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 413fc9c4a..be155e086 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -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; } |