]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-report-mirror-failure
* apt-pkg/indexcopy.cc:
[apt.git] / cmdline / apt-report-mirror-failure
index 70b16cf4feb6f016328c7585c7c040f7d730d247..7c390642a7ce8a78ed93abf2e1a77754bdd70fe8 100755 (executable)
@@ -1,21 +1,27 @@
 #!/usr/bin/python
+#
+# This is a stub that is meant to support failure reporting of 
+# mirrors to a central database
+#
+# its currently not used
 
 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")
+url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "")
+                          #"http://people.ubuntu.com:9000/mirror-failure")
                           #"http://localhost:9000/mirror-failure")
 if not url:
     sys.exit(0)
 
+print "Reporting mirror failure to '%s'" % url
+
 data = {}
-data['url'] = sys.argv[1]
-data['error'] = sys.argv[2]
+data['mirror'] = sys.argv[1]
+data['failurl'] = sys.argv[2]
+data['error'] = sys.argv[3]
 f = urllib.urlopen(url, urllib.urlencode(data))
 f.read()
 f.close()