}
// report mirror failure back to LP if we actually use a mirror
- if(!UsedMirror.empty())
- ReportMirrorFailure(ErrorText);
+ ReportMirrorFailure(ErrorText);
}
/*}}}*/
// Acquire::Item::Start - Item has begun to download /*{{{*/
void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
{
- // report that Queue->Uri failed
+ // we only act if a mirror was used at all
+ if(UsedMirror.empty())
+ return;
#if 0
std::cerr << "\nReportMirrorFailure: "
<< UsedMirror
+ << " Uri: " << DescURI()
<< " FailCode: "
<< FailCode << std::endl;
#endif
Status = StatAuthError;
ErrorText = _("MD5Sum mismatch");
Rename(DestFile,DestFile + ".FAILED");
+ ReportMirrorFailure("HashChecksumFailure");
return;
}
// Done, move it into position
}
// gpgv method failed
+ ReportMirrorFailure("GPGFailure");
_error->Warning("GPG error: %s: %s",
Desc.Description.c_str(),
LookupTag(Message,"Message").c_str());
/*}}}*/
/* Done:
- * - works with http only
+ * - works with http (only!)
* - always picks the first mirror from the list
* - call out to problem reporting script
* - supports "deb mirror://host/path/to/mirror-list/// dist component"
+ * - use pkgAcqMethod::FailReason() to have a string representation
+ * of the failure that is also send to LP
*
* TODO:
- * what about gpgv failures? this should call-out to the problem reporting
- script, but we need to know what mirror was used -> just run pkgAcquire::Item::ReportMirrorFailure()
- * better standard format for errors to send back
- * - implement failure reporting at the pkgAcquire::Item::Failed() level
- but then we need to send back what uri exactly was failing
- [mvo: the problem with this approach is ::Failed() is not really
- called for all failures :/ e.g. md5sum mismatch in a archive
- is not]
* - deal with runing as non-root because we can't write to the lists
dir then -> use the cached mirror file
* - better method to download than having a pkgAcquire interface here
#: 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:96
+#: apt-pkg/acquire.cc:421 apt-pkg/clean.cc:38 methods/mirror.cc:98
#, c-format
msgid "Unable to read %s"
msgstr ""
msgid "Unable to accept connection"
msgstr ""
-#: methods/ftp.cc:864 methods/http.cc:957 methods/rsh.cc:303
+#: methods/ftp.cc:864 methods/http.cc:960 methods/rsh.cc:303
msgid "Problem hashing file"
msgstr ""
msgid "Connecting to %s"
msgstr ""
-#: methods/connect.cc:166
+#: methods/connect.cc:167
#, c-format
msgid "Could not resolve '%s'"
msgstr ""
-#: methods/connect.cc:172
+#: methods/connect.cc:173
#, c-format
msgid "Temporary failure resolving '%s'"
msgstr ""
-#: methods/connect.cc:175
+#: methods/connect.cc:176
#, c-format
msgid "Something wicked happened resolving '%s:%s' (%i)"
msgstr ""
-#: methods/connect.cc:222
+#: methods/connect.cc:223
#, c-format
msgid "Unable to connect to %s %s:"
msgstr ""
msgid "Error reading from server"
msgstr ""
-#: methods/http.cc:1106
+#: methods/http.cc:1109
msgid "Bad header data"
msgstr ""
-#: methods/http.cc:1123
+#: methods/http.cc:1126
msgid "Connection failed"
msgstr ""
-#: methods/http.cc:1214
+#: methods/http.cc:1217
msgid "Internal error"
msgstr ""
msgstr ""
#: apt-pkg/contrib/cdromutl.cc:149 apt-pkg/acquire.cc:427 apt-pkg/clean.cc:44
-#: methods/mirror.cc:102
+#: methods/mirror.cc:104
#, c-format
msgid "Unable to change to %s"
msgstr ""
msgid "IO Error saving source cache"
msgstr ""
-#: apt-pkg/acquire-item.cc:131
+#: apt-pkg/acquire-item.cc:130
#, c-format
msgid "rename failed, %s (%s -> %s)."
msgstr ""
-#: apt-pkg/acquire-item.cc:279 apt-pkg/acquire-item.cc:988
+#: apt-pkg/acquire-item.cc:281 apt-pkg/acquire-item.cc:992
msgid "MD5Sum mismatch"
msgstr ""
-#: apt-pkg/acquire-item.cc:683
+#: apt-pkg/acquire-item.cc:686
msgid "There is no public key available for the following key IDs:\n"
msgstr ""
-#: apt-pkg/acquire-item.cc:796
+#: apt-pkg/acquire-item.cc:800
#, 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:855
+#: apt-pkg/acquire-item.cc:859
#, 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:891
+#: apt-pkg/acquire-item.cc:895
#, c-format
msgid ""
"The package index files are corrupted. No Filename: field for package %s."
msgstr ""
-#: apt-pkg/acquire-item.cc:978
+#: apt-pkg/acquire-item.cc:982
msgid "Size mismatch"
msgstr ""