From: Ian Jackson Date: Sat, 20 Jun 2015 16:31:09 +0000 (+0100) Subject: Infra: dgit-ssh-dispatch sets PERLLIB X-Git-Tag: debian/0.30~77 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=16570fa6d2c817138272294ac143db1252376ba8 Infra: dgit-ssh-dispatch sets PERLLIB --- diff --git a/infra/dgit-ssh-dispatch b/infra/dgit-ssh-dispatch index 377f8b81..f5250555 100755 --- a/infra/dgit-ssh-dispatch +++ b/infra/dgit-ssh-dispatch @@ -130,6 +130,9 @@ sub dispatch () { my $cmd=$1; selectpackage $2,$3; if ($cmd eq 'receive-pack') { + $ENV{'PERLLIB'} //= ''; + $ENV{'PERLLIB'} =~ s#^(?=.)#:#; + $ENV{'PERLLIB'} =~ s#^# $ENV{DGIT_TEST_INTREE} // $dgitlive #e; my $s = "$dgitlive/infra/dgit-repos-server"; exec $s, $distro, $d, $authrune, qw(--ssh); die "exec $s: $!"; diff --git a/tests/dsd-ssh b/tests/dsd-ssh index 7a075f0b..94a95827 100755 --- a/tests/dsd-ssh +++ b/tests/dsd-ssh @@ -8,6 +8,11 @@ tmp=$DGIT_TEST_TMP cd / userhost="$1"; shift export SSH_ORIGINAL_COMMAND="$*" + +# undoes PERLLIB so that we rely on dgit-ssh-dispatch setting it +# we have to compensate with -I so that dgit-ssh-dispatch finds Dgit.pm +unset PERLLIB +perl -I $DGIT_TEST_INTREE \ ${DGIT_SSH_DISPATCH_TEST-dgit-ssh-dispatch} -D $tmp : '))))))))))))))))))))))))))))))))))))))))'