libstore: remove DerivationGoal::queryPartialDerivationOutputMap

it's fully redundant with queryDerivationOutputMap.

Change-Id: I38475ab1249bdf9db66d8538fb230579f036a3f2
This commit is contained in:
eldritch horrors
2025-05-20 17:43:46 +00:00
parent 6785f5c720
commit ab36085b6b
2 changed files with 11 additions and 24 deletions
+2 -14
View File
@@ -1416,16 +1416,6 @@ void DerivationGoal::flushLine()
}
kj::Promise<Result<std::map<std::string, std::optional<StorePath>>>> DerivationGoal::queryPartialDerivationOutputMap()
try {
std::map<std::string, std::optional<StorePath>> res;
for (auto & [name, output] : drv->outputs)
res.insert_or_assign(name, output.path(worker.store, drv->name, name));
co_return res;
} catch (...) {
co_return result::current_exception();
}
kj::Promise<Result<OutputPathMap>> DerivationGoal::queryDerivationOutputMap()
try {
OutputPathMap res;
@@ -1450,7 +1440,7 @@ try {
}, wantedOutputs.raw);
SingleDrvOutputs validOutputs;
for (auto & i : TRY_AWAIT(queryPartialDerivationOutputMap())) {
for (auto & i : TRY_AWAIT(queryDerivationOutputMap())) {
auto initialOutput = get(initialOutputs, i.first);
if (!initialOutput)
// this is an invalid output, gets catched with (!wantedOutputsLeft.empty())
@@ -1459,8 +1449,7 @@ try {
info.wanted = wantedOutputs.contains(i.first);
if (info.wanted)
wantedOutputsLeft.erase(i.first);
if (i.second) {
auto outputPath = *i.second;
auto & outputPath = i.second;
info.known = {
.path = outputPath,
.status = !TRY_AWAIT(worker.store.isValidPath(outputPath))
@@ -1469,7 +1458,6 @@ try {
? PathStatus::Valid
: PathStatus::Corrupt,
};
}
auto drvOutput = DrvOutput{info.outputHash, i.first};
if (info.known && info.known->isValid())
validOutputs.emplace(i.first, Realisation { drvOutput, info.known->path });
+1 -2
View File
@@ -326,11 +326,10 @@ protected:
public:
/**
* Wrappers around the corresponding Store methods that first consult the
* Wrappers around the corresponding Store method that first consults the
* derivation. This is currently needed because when there is no drv file
* there also is no DB entry.
*/
kj::Promise<Result<std::map<std::string, std::optional<StorePath>>>> queryPartialDerivationOutputMap();
kj::Promise<Result<OutputPathMap>> queryDerivationOutputMap();
/**