Browse Source

* 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

Michael Vogt 19 years ago
parent
commit
3f599bb721

+ 1 - 1
apt-pkg/acquire-item.cc

@@ -154,7 +154,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
    const char *Args[40];
    const char *Args[40];
    unsigned int i = 0;
    unsigned int i = 0;
    string report = _config->Find("Methods::Mirror::ProblemReporting", 
    string report = _config->Find("Methods::Mirror::ProblemReporting", 
-				 "/usr/bin/apt-report-mirror-failure");
+				 "/usr/lib/apt/apt-report-mirror-failure");
    if(!FileExists(report))
    if(!FileExists(report))
       return;
       return;
    Args[i++] = report.c_str();
    Args[i++] = report.c_str();

+ 2 - 2
cmdline/apt-report-mirror-failure

@@ -5,8 +5,8 @@ import urllib
 import apt_pkg
 import apt_pkg
 
 
 apt_pkg.init()
 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")
                           #"http://localhost:9000/mirror-failure")
 if not url:
 if not url:
     sys.exit(0)
     sys.exit(0)

+ 1 - 1
cmdline/makefile

@@ -55,6 +55,6 @@ include $(COPY_H)
 
 
 # The apt-key program
 # The apt-key program
 SOURCE=apt-report-mirror-failure
 SOURCE=apt-report-mirror-failure
-TO=$(LIB)
+TO=$(BIN)
 TARGET=program
 TARGET=program
 include $(COPY_H)
 include $(COPY_H)

+ 4 - 0
debian/rules

@@ -214,6 +214,10 @@ apt: build debian/shlibs.local
 
 
 #	head -n 500 ChangeLog > debian/ChangeLog
 #	head -n 500 ChangeLog > debian/ChangeLog
 
 
+	# move the mirror failure script in place
+	mv debian/$@/usr/bin/apt-report-mirror-failure \
+	   debian/$@/usr/lib/apt/apt-report-mirror-failure \
+
 	dh_installexamples -p$@ $(BLD)/docs/examples/*
 	dh_installexamples -p$@ $(BLD)/docs/examples/*
 	dh_installman -p$@ 
 	dh_installman -p$@ 
 	dh_installcron -p$@
 	dh_installcron -p$@

+ 4 - 0
doc/examples/configure-index

@@ -166,6 +166,10 @@ Acquire
    RefreshInterval "360"; // refresh interval in minutes
    RefreshInterval "360"; // refresh interval in minutes
    MaxAge "90";           // max age for a mirror file in days before 
    MaxAge "90";           // max age for a mirror file in days before 
                           // it gets deleted
                           // it gets deleted
+   // mirror failure reporting script
+   ProblemReporting "/usr/lib/apt/apt-report-mirror-failure"; 
+   // mirror failure reporting url
+   ReportFailures "http://example.com/mirror-failure"; 
   };
   };
 };
 };
 
 

+ 1 - 0
methods/mirror.cc

@@ -42,6 +42,7 @@ using namespace std;
  * - deal with runing as non-root because we can't write to the lists 
  * - deal with runing as non-root because we can't write to the lists 
      dir then -> use the cached mirror file
      dir then -> use the cached mirror file
  * - better method to download than having a pkgAcquire interface here
  * - better method to download than having a pkgAcquire interface here
+ *   and better error handling there!
  * - support more than http
  * - support more than http
  * - testing :)
  * - testing :)
  */
  */