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>
from __future__ import absolute_import
import sys, os, struct
-from bup import options, helpers
+
+from bup import options, helpers, path
+
optspec = """
bup on--server
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