summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index c7bc00e0b..433a2a6fa 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -511,6 +511,7 @@ static void CheckDropPrivsMustBeDisabled(pkgAcquire const &Fetcher)
}
pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall)
{
+ _error->PushToStack();
CheckDropPrivsMustBeDisabled(*this);
Running = true;
@@ -548,11 +549,9 @@ pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall)
_error->Errno("select","Select has failed");
break;
}
-
+
RunFds(&RFds,&WFds);
- if (_error->PendingError() == true)
- break;
-
+
// Timeout, notify the log class
if (Res == 0 || (Log != 0 && Log->Update == true))
{
@@ -577,9 +576,11 @@ pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall)
// Shut down the items
for (ItemIterator I = Items.begin(); I != Items.end(); ++I)
- (*I)->Finished();
-
- if (_error->PendingError())
+ (*I)->Finished();
+
+ bool const newError = _error->PendingError();
+ _error->MergeWithStack();
+ if (newError)
return Failed;
if (WasCancelled)
return Cancelled;