diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-method.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 82f4b626d..646e96196 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -80,9 +80,20 @@ void pkgAcqMethod::Fail(bool Transient) { string Err = "Undetermined Error"; if (_error->empty() == false) - _error->PopMessage(Err); - _error->Discard(); - Fail(Err,Transient); + { + Err.clear(); + while (_error->empty() == false) + { + std::string msg; + if (_error->PopMessage(msg)) + { + if (Err.empty() == false) + Err.append("\n"); + Err.append(msg); + } + } + } + Fail(Err, Transient); } /*}}}*/ // AcqMethod::Fail - A fetch has failed /*{{{*/ |