chiark / gitweb /
infra: Pass distro to dgit-repos-server
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 17 Mar 2015 21:52:36 +0000 (21:52 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Mar 2015 15:18:52 +0000 (15:18 +0000)
infra/dgit-repos-server
infra/dgit-ssh-dispatch

index c70bc27..a2916d6 100755 (executable)
@@ -2,7 +2,7 @@
 # dgit-repos-server
 #
 # usages:
-#  .../dgit-repos-server SUITES KEYRING-AUTH-SPEC DGIT-REPOS-DIR --ssh
+#  .../dgit-repos-server DISTRO SUITES KEYRING-AUTH-SPEC DGIT-REPOS-DIR --ssh
 # internal usage:
 #  .../dgit-repos-server --pre-receive-hook PACKAGE
 #
@@ -549,6 +549,7 @@ sub parseargsdispatch () {
        shift @ARGV;
        @ARGV == 1 or die;
        $package = shift @ARGV;
+       defined($distro = $ENV{'DGIT_DRS_DISTRO'}) or die;
        defined($suitesfile = $ENV{'DGIT_DRS_SUITES'}) or die;
        defined($workrepo = $ENV{'DGIT_DRS_WORK'}) or die;
        defined($destrepo = $ENV{'DGIT_DRS_DEST'}) or die;
@@ -564,6 +565,7 @@ sub parseargsdispatch () {
        exit 0;
     }
 
+    $ENV{'DGIT_DRS_DISTRO'} = argval();
     $ENV{'DGIT_DRS_SUITES'} = argval();
     $ENV{'DGIT_DRS_KEYRINGS'} = argval();
     $dgitrepos = argval();
index b515eda..88311ee 100755 (executable)
@@ -121,7 +121,7 @@ sub dispatch () {
        selectpackage $2,$3;
        if ($cmd eq 'receive-pack') {
            my $s = "$dgitlive/infra/dgit-repos-server";
-           exec $s, $suites, $authrune, $repos, qw(--ssh);
+           exec $s, $distro, $suites, $authrune, $repos, qw(--ssh);
            die "exec $s: $!";
        } elsif ($cmd eq 'upload-pack') {
            $repo='$repos/_empty' unless hasrepo;