summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2022-04-29 16:30:05 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2024-11-22 12:40:10 +0000
commit841243df877b39dfcb907a7fab9c4e8b4f65d715 (patch)
tree944e5369c4b13ac0b11470e4095446a8b21d0288 /apt-pkg
parent83ff257477c9e5d4ef1b74cb42780f22660af109 (diff)
Clear previous ignored errors before processing acquire item again
If an item failed previously, but that failure is ignored and a retry is triggered we might end up in a situation in which it is failing yet again for perhaps totally different reasons, but the error message displayed is the one we have shown (or, because it was ignored likely hidden) before which can be rather confusing in debugging.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-worker.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 533089ea5..ba3d52952 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -478,6 +478,8 @@ bool pkgAcquire::Worker::RunMessages()
}
std::vector<Item*> const ItmOwners = Itm->Owners;
+ for (auto const Owner : ItmOwners)
+ Owner->ErrorText.clear();
OwnerQ->ItemDone(Itm);
Itm = NULL;
@@ -625,6 +627,8 @@ bool pkgAcquire::Worker::RunMessages()
Log->Pulse((*O)->GetOwner());
std::vector<Item*> const ItmOwners = Itm->Owners;
+ for (auto const Owner : ItmOwners)
+ Owner->ErrorText.clear();
OwnerQ->ItemDone(Itm);
Itm = nullptr;