From 36280399db0ae203d3f1ae4d44b946f31e9a38ce Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 1 Feb 2007 12:32:50 +0100 Subject: * commited the latest mirror failure detection code --- cmdline/apt-report-mirror-failure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 cmdline/apt-report-mirror-failure (limited to 'cmdline/apt-report-mirror-failure') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure new file mode 100755 index 000000000..70b16cf4f --- /dev/null +++ b/cmdline/apt-report-mirror-failure @@ -0,0 +1,23 @@ +#!/usr/bin/python + +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") + #"http://localhost:9000/mirror-failure") +if not url: + sys.exit(0) + +data = {} +data['url'] = sys.argv[1] +data['error'] = sys.argv[2] +f = urllib.urlopen(url, urllib.urlencode(data)) +f.read() +f.close() + + -- cgit v1.2.3 From 361593e92a44255cc0ef98417e7457911716cab5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 1 Feb 2007 13:02:47 +0100 Subject: * get the mirror failure stuff really working --- cmdline/apt-report-mirror-failure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-report-mirror-failure') 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] -- cgit v1.2.3 From f0b509cdb44cb5e79e9c5ddd7ebec46965138534 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Feb 2007 19:06:42 +0100 Subject: * apt-pkg/acquire-item.cc: - use FailReason in pkgAcquire::Item::Failed when available * methods/mirror.cc: - move some debug output into if(Debug) --- cmdline/apt-report-mirror-failure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-report-mirror-failure') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index 277b23e9a..fb43f0e74 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -14,8 +14,9 @@ if not url: 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() -- cgit v1.2.3 From 3f599bb721c4ac58d8ff18991c9704b5f30eaa2b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 6 Feb 2007 10:49:25 +0100 Subject: * apt-pkg/acquire-item.cc: - default to "/usr/lib/apt/apt-report-mirror-failure" * cmdline/apt-report-mirror-failure: - no default comit url for now * debian/rules: - move apt-report-mirror-failure into /usr/lib/apt * doc/examples/configure-index: - more documentation * methods/mirror.cc: - updated TODO --- cmdline/apt-report-mirror-failure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-report-mirror-failure') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index fb43f0e74..1567e78e3 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -5,8 +5,8 @@ import urllib import apt_pkg 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", None) + #"http://people.ubuntu.com:9000/mirror-failure") #"http://localhost:9000/mirror-failure") if not url: sys.exit(0) -- cgit v1.2.3 From 5dad4134da37576de12721f34165c1fe4d138b3c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 19 Mar 2009 15:42:25 +0100 Subject: * methods/mirror.cc: - when download the mirror file and the server is down, return a propper error message (LP: #278635) --- cmdline/apt-report-mirror-failure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-report-mirror-failure') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index 1567e78e3..ef77d4954 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -5,7 +5,7 @@ import urllib import apt_pkg apt_pkg.init() -url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", None) +url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", "") #"http://people.ubuntu.com:9000/mirror-failure") #"http://localhost:9000/mirror-failure") if not url: -- cgit v1.2.3 From 164fed49362b28c0264c293a14a06d167e32b76f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Jun 2010 21:43:55 +0200 Subject: cmdline/apt-report-mirror-failure: port to latest python-apt --- cmdline/apt-report-mirror-failure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-report-mirror-failure') diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure index ef77d4954..e8ffdc2c7 100755 --- a/cmdline/apt-report-mirror-failure +++ b/cmdline/apt-report-mirror-failure @@ -5,7 +5,7 @@ import urllib import apt_pkg apt_pkg.init() -url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", "") +url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "") #"http://people.ubuntu.com:9000/mirror-failure") #"http://localhost:9000/mirror-failure") if not url: -- cgit v1.2.3