chiark / gitweb /
Infra: dgit-ssh-dispatch sets PERLLIB
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jun 2015 16:31:09 +0000 (17:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jun 2015 16:31:09 +0000 (17:31 +0100)
infra/dgit-ssh-dispatch
tests/dsd-ssh

index 377f8b81d6786ba706ea73e75e0ac2aa6c3043d2..f5250555bb44ad3ce8cb1c8e5b00ef50ac4a28e3 100755 (executable)
@@ -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: $!";
index 7a075f0b4f660bb4a6c4715e35b927d7fcbc178b..94a95827f2c0cfccbfd6a83708f17e56c885f1c6 100755 (executable)
@@ -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
 
 : '))))))))))))))))))))))))))))))))))))))))'