summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-02-05 19:06:42 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-02-05 19:06:42 +0100
commitf0b509cdb44cb5e79e9c5ddd7ebec46965138534 (patch)
treef6ec16d25933148a946360098a4dcc29e129814e /apt-pkg
parent066b53e95ba224f81d078e7d8df3002275f8a092 (diff)
* apt-pkg/acquire-item.cc:
- use FailReason in pkgAcquire::Item::Failed when available * methods/mirror.cc: - move some debug output into if(Debug)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc7
1 files changed, 6 insertions, 1 deletions
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();