chiark / gitweb /
configurable mirror
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 16 Aug 2013 15:35:03 +0000 (16:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 16 Aug 2013 15:35:03 +0000 (16:35 +0100)
dgit
dgit.1

diff --git a/dgit b/dgit
index c66a001482120f40932a3b300d4f4704783c1a2d..23c5f812a50a7411e8664155f7dea09f1c41fec1 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -26,7 +26,6 @@ use Dpkg::Control::Hash;
 use File::Path;
 use POSIX;
 
-our $mirror = 'http://mirror.relativity.greenend.org.uk/mirror/debian-ftp/';
 our $suite = 'sid';
 our $package;
 
@@ -139,7 +138,8 @@ our %defcfg = ('dgit.default.distro' => 'debian',
               'dgit-distro.debian.git-proto' => 'git+ssh://',
               'dgit-distro.debian.git-path' => '/git/dgit-repos',
               'dgit-distro.debian.git-check' => 'ssh-cmd',
-              'dgit-distro.debian.git-create' => 'ssh-cmd');
+              'dgit-distro.debian.git-create' => 'ssh-cmd',
+              'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/');
 
 sub cfg {
     foreach my $c (@_) {
@@ -224,7 +224,8 @@ sub get_archive_dsc () {
     my $vsn = askmadison();
     # fixme madison does not show us the component
     my $prefix = substr($package, 0, $package =~ m/^l/ ? 4 : 1);
-    $dscurl = "$mirror/pool/main/$prefix/$package/${package}_$vsn.dsc";
+    $dscurl = access_cfg('mirror').
+       "/pool/main/$prefix/$package/${package}_$vsn.dsc";
     $dscdata = url_get($dscurl);
     my $dscfh = new IO::File \$dscdata, '<' or die $!;
     print DEBUG Dumper($dscdata);
diff --git a/dgit.1 b/dgit.1
index feb6d7a58a4e0662b19cf4aeb6ea09c6a15d9860..5895458a1722b0bf360662382f355b4577871344 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -160,6 +160,8 @@ on the dgit command line.
 .TP
 .BI dgit-distro. distro .upload-host
 .TP
+.BI dgit-distro. distro .mirror
+.TP
 .BI dgit-distro. distro .ssh
 .TP
 .BR dgit.default. *