From: Johannes Berg Date: Wed, 1 Jan 2020 17:50:07 +0000 (+0100) Subject: bup: use correct bup executable in on--server X-Git-Tag: 0.31~211 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=ca343d8e00d453daf2c94552a7524a9d375f34e9 bup: use correct bup executable in on--server Currently, on--server loses the correct bup command in one situation: if you run 'bup on remote' with a remote forced ssh command that's different from the installed bup, on--server will still execute the installed version of bup for all sub-commands. Fix that by using bup.path.exe() in on--server for bup execution. Signed-off-by: Johannes Berg Reviewed-by: Rob Browning Tested-by: Rob Browning --- diff --git a/cmd/on--server-cmd.py b/cmd/on--server-cmd.py index 0d29e43..64e79d2 100755 --- a/cmd/on--server-cmd.py +++ b/cmd/on--server-cmd.py @@ -7,7 +7,9 @@ exec "$bup_python" "$0" ${1+"$@"} from __future__ import absolute_import import sys, os, struct -from bup import options, helpers + +from bup import options, helpers, path + optspec = """ bup on--server @@ -30,6 +32,7 @@ assert(sz < 1000000) buf = sys.stdin.read(sz) assert(len(buf) == sz) argv = buf.split('\0') +argv[0] = path.exe() argv = [argv[0], 'mux', '--'] + argv # stdin/stdout are supposedly connected to 'bup server' that the caller