]> arthur.barton.de Git - bup.git/commitdiff
ftp: fix tab completion
authorRob Browning <rlb@defaultvalue.org>
Sun, 11 Apr 2021 20:06:37 +0000 (15:06 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 11 Apr 2021 20:06:37 +0000 (15:06 -0500)
We need the 'repo' variable in enter_completion() which assumes
it's global, so make it global.

Fixes: c4d10541ed1e ("ftp: convert to internal command")
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
config/configure
lib/bup/cmd/ftp.py

index 2223c7eb3e2ac78b86e3fdc92dd3f6f832bb787c..d8f6b4b8ec430bf631d9dbc150332da01085ddba 100755 (executable)
@@ -104,13 +104,15 @@ else  # Earlier versions didn't support --embed
     bup_python_ldflags_embed=$("$bup_python_config" --ldflags) || exit $?
 fi
 
+bup_python_cflags="$bup_python_cflags -fPIC"
+
 case "$OSTYPE" in
     darwin*)
         # For at least 10.3+ (2003+)
         bup_python_ldflags="$bup_python_ldflags -bundle -undefined dynamic_lookup"
         ;;
     *)
-        bup_python_ldflags="$bup_python_ldflags -shared -fPIC"
+        bup_python_ldflags="$bup_python_ldflags -shared"
         ;;
 esac
 
index bed1b9af21159da0ba968685f122d83edf3eb15a..40449a652502cf8932eaeb98771229786b4cc987 100755 (executable)
@@ -14,6 +14,8 @@ from bup.io import byte_stream, path_msg
 from bup.repo import LocalRepo
 
 
+repo = None
+
 class OptionError(Exception):
     pass
 
@@ -122,6 +124,8 @@ def main(argv):
 
     git.check_repo_or_die()
 
+    global repo
+
     sys.stdout.flush()
     out = byte_stream(sys.stdout)
     stdin = byte_stream(sys.stdin)