aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-21 21:11:58 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-21 21:11:58 +0000
commit93bbe6e8ab9ae4b76942a2acafa072483be20807 (patch)
tree2c5136de51d838cb4046595284ca4f2cafa106b5 /src/libstore/local-store.cc
parent3804e3df9bb479fe1d399f29d16a1aabaf352c19 (diff)
parent984e521392b3f41f7cdab203e5c00f3e00e27a28 (diff)
Merge remote-tracking branch 'upstream/master' into ca-drv
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index fb327807a..0c60ee037 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -561,10 +561,12 @@ void LocalStore::checkDerivationOutputs(const StorePath & drvPath, const Derivat
if (out == drv.outputs.end())
throw Error("derivation '%s' does not have an output named 'out'", printStorePath(drvPath));
- FileIngestionMethod method; Hash h;
- out->second.parseHashInfo(method, h);
-
- check(makeFixedOutputPath(method, h, drvName), out->second.path, "out");
+ check(
+ makeFixedOutputPath(
+ out->second.hash->method,
+ out->second.hash->hash,
+ drvName),
+ out->second.path, "out");
}
else {
@@ -1253,9 +1255,9 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
std::unique_ptr<AbstractHashSink> hashSink;
if (info->ca == "" || !info->references.count(info->path))
- hashSink = std::make_unique<HashSink>(info->narHash.type);
+ hashSink = std::make_unique<HashSink>(*info->narHash.type);
else
- hashSink = std::make_unique<HashModuloSink>(info->narHash.type, std::string(info->path.hashPart()));
+ hashSink = std::make_unique<HashModuloSink>(*info->narHash.type, std::string(info->path.hashPart()));
dumpPath(Store::toRealPath(i), *hashSink);
auto current = hashSink->finish();