From f0b509cdb44cb5e79e9c5ddd7ebec46965138534 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Feb 2007 19:06:42 +0100 Subject: * apt-pkg/acquire-item.cc: - use FailReason in pkgAcquire::Item::Failed when available * methods/mirror.cc: - move some debug output into if(Debug) --- apt-pkg/acquire-item.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 08a029ff4..14610d6e9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -82,7 +82,11 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) } // report mirror failure back to LP if we actually use a mirror - ReportMirrorFailure(ErrorText); + string FailReason = LookupTag(Message, "FailReason"); + if(FailReason.size() != 0) + ReportMirrorFailure(FailReason); + else + ReportMirrorFailure(ErrorText); } /*}}}*/ // Acquire::Item::Start - Item has begun to download /*{{{*/ @@ -155,6 +159,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) return; Args[i++] = report.c_str(); Args[i++] = UsedMirror.c_str(); + Args[i++] = DescURI().c_str(); Args[i++] = FailCode.c_str(); Args[i++] = NULL; pid_t pid = ExecFork(); -- cgit v1.2.3