1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 03:09:35 +01:00

Progress bar: Add a key to show what paths remain to be built/substituted

This commit is contained in:
Eelco Dolstra 2020-12-17 15:24:14 +01:00
parent 2392688a2d
commit ed80589a07
3 changed files with 74 additions and 20 deletions

View file

@ -103,12 +103,16 @@ static void removeGoal(std::shared_ptr<G> goal, std::map<StorePath, std::weak_pt
void Worker::removeGoal(GoalPtr goal)
{
if (auto drvGoal = std::dynamic_pointer_cast<DerivationGoal>(goal))
if (auto drvGoal = std::dynamic_pointer_cast<DerivationGoal>(goal)) {
act.result(resUnexpectBuild, store.printStorePath(drvGoal->drvPath));
nix::removeGoal(drvGoal, derivationGoals);
else if (auto subGoal = std::dynamic_pointer_cast<SubstitutionGoal>(goal))
}
else if (auto subGoal = std::dynamic_pointer_cast<SubstitutionGoal>(goal)) {
act.result(resUnexpectSubstitution, store.printStorePath(subGoal->storePath));
nix::removeGoal(subGoal, substitutionGoals);
else
} else
assert(false);
if (topGoals.find(goal) != topGoals.end()) {
topGoals.erase(goal);
/* If a top-level goal failed, then kill all other goals
@ -223,6 +227,12 @@ void Worker::run(const Goals & _topGoals)
uint64_t downloadSize, narSize;
store.queryMissing(topPaths, willBuild, willSubstitute, unknown, downloadSize, narSize);
for (auto & path : willBuild)
act.result(resExpectBuild, store.printStorePath(path));
for (auto & path : willSubstitute)
act.result(resExpectSubstitution, store.printStorePath(path));
debug("entered goal loop");
while (1) {