diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-02-01 13:02:47 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-02-01 13:02:47 +0100 |
commit | 361593e92a44255cc0ef98417e7457911716cab5 (patch) | |
tree | 5207820f85462c32b0ff4639f254918583200811 /apt-pkg/acquire-item.cc | |
parent | 36280399db0ae203d3f1ae4d44b946f31e9a38ce (diff) |
* get the mirror failure stuff really working
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 61564c7aa..0d3d6a083 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -63,6 +63,7 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) { Status = StatIdle; ErrorText = LookupTag(Message,"Message"); + UsedMirror = LookupTag(Message,"UsedMirror"); if (QueueCounter <= 1) { /* This indicates that the file is not available right now but might @@ -153,6 +154,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) Args[i++] = report.c_str(); Args[i++] = UsedMirror.c_str(); Args[i++] = FailCode.c_str(); + Args[i++] = NULL; pid_t pid = ExecFork(); if(pid < 0) { @@ -161,12 +163,14 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) } else if(pid == 0) { - execvp(report.c_str(), (char**)Args); + execvp(Args[0], (char**)Args); + std::cerr << "Could not exec " << Args[0] << std::endl; + _exit(100); } if(!ExecWait(pid, "report-mirror-failure")) { _error->Warning("Couldn't report problem to '%s'", - _config->Find("Acquire::Mirror::ReportFailures").c_str()); + _config->Find("Methods::Mirror::ProblemReporting").c_str()); } } |