mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
Don't add StorePathDescriptor for now
We don't need it yet, we can add it back later.
This commit is contained in:
parent
c67e0cc58c
commit
4540e7b940
14 changed files with 126 additions and 151 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue