diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-20 19:13:07 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-20 19:15:13 +0100 |
commit | 68ace2786dc26749014ea70a6ebb2b896b1f25d1 (patch) | |
tree | 27fc4aacc039fb037d72939ee0ae9acf58c6a036 /infra/dgit-ssh-dispatch | |
parent | e170fb0964308d97bf19f341ea79dab08f11935e (diff) |
Infra: Support not running out of working tree
Diffstat (limited to 'infra/dgit-ssh-dispatch')
-rwxr-xr-x | infra/dgit-ssh-dispatch | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/infra/dgit-ssh-dispatch b/infra/dgit-ssh-dispatch index f525055..6d4efbf 100755 --- a/infra/dgit-ssh-dispatch +++ b/infra/dgit-ssh-dispatch @@ -22,7 +22,7 @@ our $lre = $package_re; our $qre = '["'."']?"; # $dispatchdir/distro=DISTRO should contain -# dgit-live a clone of dgit +# dgit-live a clone of dgit (only if not using installed vsns) # diverts # repos/ } by virtue of # suites } dgit-repos-server's defaults relating to @@ -134,6 +134,7 @@ sub dispatch () { $ENV{'PERLLIB'} =~ s#^(?=.)#:#; $ENV{'PERLLIB'} =~ s#^# $ENV{DGIT_TEST_INTREE} // $dgitlive #e; my $s = "$dgitlive/infra/dgit-repos-server"; + $s = "dgit-repos-server" if !stat_exists $s; exec $s, $distro, $d, $authrune, qw(--ssh); die "exec $s: $!"; } elsif ($cmd eq 'upload-pack') { @@ -146,6 +147,8 @@ sub dispatch () { m#^${qre}git-upload-pack ${qre}/dgit/($lre)/(?:repos/)?_dgit-repos-server\.git${qre}$# ) { my $distro= $1; + # if running installed packages, source code should come + # some other way serve_up("$dispatchdir/distro=$1/dgit-live/.git"); } elsif (m#^${qre}git-upload-pack\s#) { die "unknown repo to serve ($_). use dgit, or for server source ". |