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 | |
parent | 36280399db0ae203d3f1ae4d44b946f31e9a38ce (diff) |
* get the mirror failure stuff really working
-rw-r--r-- | apt-pkg/acquire-item.cc | 8 | ||||
-rwxr-xr-x | cmdline/apt-report-mirror-failure | 4 | ||||
-rw-r--r-- | po/apt-all.pot | 20 |
3 files changed, 18 insertions, 14 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()); } } diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index 70b16cf4f..277b23e9a 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -4,8 +4,6 @@ import sys import urllib import apt_pkg -print "apt-report-mirror-failure" - apt_pkg.init() url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", "http://people.ubuntu.com:9000/mirror-failure") @@ -13,6 +11,8 @@ url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", if not url: sys.exit(0) +print "Reporting mirror failure to '%s'" % url + data = {} data['url'] = sys.argv[1] data['error'] = sys.argv[2] diff --git a/po/apt-all.pot b/po/apt-all.pot index 15b650fda..39759f265 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-01-24 17:20+0100\n" +"POT-Creation-Date: 2007-02-01 12:41+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1330,7 +1330,7 @@ msgstr "" #: apt-inst/extract.cc:467 apt-pkg/contrib/configuration.cc:750 #: apt-pkg/contrib/cdromutl.cc:153 apt-pkg/sourcelist.cc:324 -#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:99 +#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:96 #, c-format msgid "Unable to read %s" msgstr "" @@ -1956,7 +1956,7 @@ msgid "Unable to stat the mount point %s" msgstr "" #: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44 -#: methods/mirror.cc:105 +#: methods/mirror.cc:102 #, c-format msgid "Unable to change to %s" msgstr "" @@ -2357,40 +2357,40 @@ msgstr "" msgid "IO Error saving source cache" msgstr "" -#: apt-pkg/acquire-item.cc:128 +#: apt-pkg/acquire-item.cc:131 #, c-format msgid "rename failed, %s (%s -> %s)." msgstr "" -#: apt-pkg/acquire-item.cc:275 apt-pkg/acquire-item.cc:984 +#: apt-pkg/acquire-item.cc:279 apt-pkg/acquire-item.cc:988 msgid "MD5Sum mismatch" msgstr "" -#: apt-pkg/acquire-item.cc:679 +#: apt-pkg/acquire-item.cc:683 msgid "There is no public key available for the following key IDs:\n" msgstr "" -#: apt-pkg/acquire-item.cc:792 +#: apt-pkg/acquire-item.cc:796 #, c-format msgid "" "I wasn't able to locate a file for the %s package. This might mean you need " "to manually fix this package. (due to missing arch)" msgstr "" -#: apt-pkg/acquire-item.cc:851 +#: apt-pkg/acquire-item.cc:855 #, c-format msgid "" "I wasn't able to locate file for the %s package. This might mean you need to " "manually fix this package." msgstr "" -#: apt-pkg/acquire-item.cc:887 +#: apt-pkg/acquire-item.cc:891 #, c-format msgid "" "The package index files are corrupted. No Filename: field for package %s." msgstr "" -#: apt-pkg/acquire-item.cc:974 +#: apt-pkg/acquire-item.cc:978 msgid "Size mismatch" msgstr "" |