diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-04-23 15:03:29 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-31 11:54:06 +0100 |
commit | 10ac2ae8f0d807790ac337b5424a53e8d5e239c2 (patch) | |
tree | fb61448151aa7c42905bc9ecb06759306605042a /infra/dgit-ssh-dispatch | |
parent | 07bdd0fbd6a2cf1c0b175afe1e075bb566ed1f2c (diff) |
dgit-repos-server etc.: Rework argument & distros-dir passing (no overall functional change)
Diffstat (limited to 'infra/dgit-ssh-dispatch')
-rwxr-xr-x | infra/dgit-ssh-dispatch | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/infra/dgit-ssh-dispatch b/infra/dgit-ssh-dispatch index 4769d89..f29515f 100755 --- a/infra/dgit-ssh-dispatch +++ b/infra/dgit-ssh-dispatch @@ -21,19 +21,19 @@ $authrune //= join ':', our $lre = $package_re; our $qre = '["'."']?"; -# $dispatchdir should contain +# $dispatchdir/distro=DISTRO should contain # dgit-live a clone of dgit -# repos/ -# suites # diverts -# policy-hook +# repos/ } by virtue of +# suites } dgit-repos-server's defaults relating to +# policy-hook } dispatch-dir # plus files required by the authrune (by default, keyrings/ and dm.txt) # # diverts should be list of # <pat> [<divert-to>] # where <pat> is a package name pattern which may contain * or literals. -our ($distro,$pkg); +our ($distro,$pkg, $d); our ($dgitlive,$repos,$suites,$diverts,$policyhook,$repo); sub checkdivert ($) { @@ -73,7 +73,7 @@ sub selectpackage ($$;$) { my $divertfn; ($distro,$pkg, $divertfn) = @_; # $distro,$pkg must have sane syntax - my $d = "$dispatchdir/distro=$distro"; + $d = "$dispatchdir/distro=$distro"; if (!stat $d) { die $! unless $!==ENOENT; @@ -125,8 +125,7 @@ sub dispatch () { selectpackage $2,$3; if ($cmd eq 'receive-pack') { my $s = "$dgitlive/infra/dgit-repos-server"; - exec $s, $distro, $suites, $authrune, $repos, - $policyhook, qw(--ssh); + exec $s, $distro, $d, $authrune, qw(--ssh); die "exec $s: $!"; } elsif ($cmd eq 'upload-pack') { $repo='$repos/_empty' unless hasrepo; |