]> arthur.barton.de Git - bup.git/commitdiff
bup: use correct bup executable in on--server
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 1 Jan 2020 17:50:07 +0000 (18:50 +0100)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Jan 2020 18:18:03 +0000 (12:18 -0600)
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 <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/on--server-cmd.py

index 0d29e4316a92831884c77f51b652a0cd791f9855..64e79d294ad1343eaeb38891668d7081149da3c5 100755 (executable)
@@ -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