2
0
Эх сурвалжийг харах

Merge pull request #538 from ThomasWaldmann/fix-library-path

unset LD_LIBRARY_PATH before invoking ssh, hopefully fixes #514
TW 9 жил өмнө
parent
commit
4a9672e8d5
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      borg/remote.py

+ 5 - 1
borg/remote.py

@@ -141,9 +141,13 @@ class RemoteRepository:
         self.p = None
         self.p = None
         testing = location.host == '__testsuite__'
         testing = location.host == '__testsuite__'
         borg_cmd = self.borg_cmd(args, testing)
         borg_cmd = self.borg_cmd(args, testing)
+        env = dict(os.environ)
         if not testing:
         if not testing:
             borg_cmd = self.ssh_cmd(location) + borg_cmd
             borg_cmd = self.ssh_cmd(location) + borg_cmd
-        self.p = Popen(borg_cmd, bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE)
+            # pyinstaller binary adds LD_LIBRARY_PATH=/tmp/_ME... but we do not want
+            # that the system's ssh binary picks up (non-matching) libraries from there
+            env.pop('LD_LIBRARY_PATH', None)
+        self.p = Popen(borg_cmd, bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env)
         self.stdin_fd = self.p.stdin.fileno()
         self.stdin_fd = self.p.stdin.fileno()
         self.stdout_fd = self.p.stdout.fileno()
         self.stdout_fd = self.p.stdout.fileno()
         self.stderr_fd = self.p.stderr.fileno()
         self.stderr_fd = self.p.stderr.fileno()