From 26ce53b790d76b41fe893d279e9ceb37bb81a3fe Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 17 Mar 2015 21:52:36 +0000 Subject: infra: Pass distro to dgit-repos-server --- infra/dgit-repos-server | 4 +++- infra/dgit-ssh-dispatch | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'infra') diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server index c70bc27..a2916d6 100755 --- a/infra/dgit-repos-server +++ b/infra/dgit-repos-server @@ -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(); diff --git a/infra/dgit-ssh-dispatch b/infra/dgit-ssh-dispatch index b515eda..88311ee 100755 --- a/infra/dgit-ssh-dispatch +++ b/infra/dgit-ssh-dispatch @@ -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; -- cgit v1.2.3