aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 654aee973..94c005130 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1136,10 +1136,9 @@ void LocalStore::querySubstitutablePathInfos(const StorePathCAMap & paths, Subst
// Recompute store path so that we can use a different store root.
if (path.second) {
- subPath = makeFixedOutputPathFromCA({
- .name = std::string { path.first.name() },
- .info = caWithoutRefs(*path.second),
- });
+ subPath = makeFixedOutputPathFromCA(
+ path.first.name(),
+ caWithoutRefs(*path.second));
if (sub->storeDir == storeDir)
assert(subPath == path.first);
if (subPath != path.first)
@@ -1417,21 +1416,18 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, std::string_view name
auto [hash, size] = hashSink->finish();
- auto desc = StorePathDescriptor {
- std::string { name },
- FixedOutputInfo {
- {
- .method = method,
- .hash = hash,
- },
- .references = {
- .others = references,
- .self = false,
- },
+ ContentAddressWithReferences desc = FixedOutputInfo {
+ {
+ .method = method,
+ .hash = hash,
+ },
+ .references = {
+ .others = references,
+ .self = false,
},
};
- auto dstPath = makeFixedOutputPathFromCA(desc);
+ auto dstPath = makeFixedOutputPathFromCA(name, desc);
addTempRoot(dstPath);
@@ -1475,7 +1471,12 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, std::string_view name
optimisePath(realPath, repair);
- ValidPathInfo info { *this, std::move(desc), narHash.first };
+ ValidPathInfo info {
+ *this,
+ name,
+ std::move(desc),
+ narHash.first
+ };
info.narSize = narHash.second;
registerValidPath(info);
}