From 841243df877b39dfcb907a7fab9c4e8b4f65d715 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 29 Apr 2022 16:30:05 +0200 Subject: 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. --- apt-pkg/acquire-worker.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg') 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 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 const ItmOwners = Itm->Owners; + for (auto const Owner : ItmOwners) + Owner->ErrorText.clear(); OwnerQ->ItemDone(Itm); Itm = nullptr; -- cgit v1.2.3-70-g09d2