mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Revert "Merge pull request #14097 from obsidiansystems/light-realisation-improvements"
This reverts commitdc8c1461da, reversing changes made to28adcfda32.
This commit is contained in:
parent
7ba3ef21a6
commit
7e39ab4dc7
32 changed files with 254 additions and 423 deletions
|
|
@ -598,8 +598,7 @@ void Store::queryPathInfo(const StorePath & storePath, Callback<ref<const ValidP
|
|||
}});
|
||||
}
|
||||
|
||||
void Store::queryRealisation(
|
||||
const DrvOutput & id, Callback<std::shared_ptr<const UnkeyedRealisation>> callback) noexcept
|
||||
void Store::queryRealisation(const DrvOutput & id, Callback<std::shared_ptr<const Realisation>> callback) noexcept
|
||||
{
|
||||
|
||||
try {
|
||||
|
|
@ -625,20 +624,20 @@ void Store::queryRealisation(
|
|||
|
||||
auto callbackPtr = std::make_shared<decltype(callback)>(std::move(callback));
|
||||
|
||||
queryRealisationUncached(id, {[this, id, callbackPtr](std::future<std::shared_ptr<const UnkeyedRealisation>> fut) {
|
||||
queryRealisationUncached(id, {[this, id, callbackPtr](std::future<std::shared_ptr<const Realisation>> fut) {
|
||||
try {
|
||||
auto info = fut.get();
|
||||
|
||||
if (diskCache) {
|
||||
if (info)
|
||||
diskCache->upsertRealisation(
|
||||
config.getReference().render(/*FIXME withParams=*/false), {*info, id});
|
||||
config.getReference().render(/*FIXME withParams=*/false), *info);
|
||||
else
|
||||
diskCache->upsertAbsentRealisation(
|
||||
config.getReference().render(/*FIXME withParams=*/false), id);
|
||||
}
|
||||
|
||||
(*callbackPtr)(std::shared_ptr<const UnkeyedRealisation>(info));
|
||||
(*callbackPtr)(std::shared_ptr<const Realisation>(info));
|
||||
|
||||
} catch (...) {
|
||||
callbackPtr->rethrow();
|
||||
|
|
@ -646,9 +645,9 @@ void Store::queryRealisation(
|
|||
}});
|
||||
}
|
||||
|
||||
std::shared_ptr<const UnkeyedRealisation> Store::queryRealisation(const DrvOutput & id)
|
||||
std::shared_ptr<const Realisation> Store::queryRealisation(const DrvOutput & id)
|
||||
{
|
||||
using RealPtr = std::shared_ptr<const UnkeyedRealisation>;
|
||||
using RealPtr = std::shared_ptr<const Realisation>;
|
||||
std::promise<RealPtr> promise;
|
||||
|
||||
queryRealisation(id, {[&](std::future<RealPtr> result) {
|
||||
|
|
@ -911,12 +910,11 @@ std::map<StorePath, StorePath> copyPaths(
|
|||
std::set<Realisation> toplevelRealisations;
|
||||
for (auto & path : paths) {
|
||||
storePaths.insert(path.path());
|
||||
if (auto * realisation = std::get_if<Realisation>(&path.raw)) {
|
||||
if (auto realisation = std::get_if<Realisation>(&path.raw)) {
|
||||
experimentalFeatureSettings.require(Xp::CaDerivations);
|
||||
toplevelRealisations.insert(*realisation);
|
||||
}
|
||||
}
|
||||
|
||||
auto pathsMap = copyPaths(srcStore, dstStore, storePaths, repair, checkSigs, substitute);
|
||||
|
||||
try {
|
||||
|
|
@ -933,7 +931,7 @@ std::map<StorePath, StorePath> copyPaths(
|
|||
"dependency of '%s' but isn't registered",
|
||||
drvOutput.to_string(),
|
||||
current.id.to_string());
|
||||
children.insert({*currentChild, drvOutput});
|
||||
children.insert(*currentChild);
|
||||
}
|
||||
return children;
|
||||
},
|
||||
|
|
@ -1201,7 +1199,7 @@ void Store::signRealisation(Realisation & realisation)
|
|||
for (auto & secretKeyFile : secretKeyFiles.get()) {
|
||||
SecretKey secretKey(readFile(secretKeyFile));
|
||||
LocalSigner signer(std::move(secretKey));
|
||||
realisation.sign(realisation.id, signer);
|
||||
realisation.sign(signer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue