[meld] Merge branch 'frozen-msystem-workaround' into 'meld-3-20'
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Merge branch 'frozen-msystem-workaround' into 'meld-3-20'
- Date: Fri, 10 Jan 2020 05:06:21 +0000 (UTC)
commit b407eadad53a4ce7e97c93e5187628a7c2d45fa7
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Jan 10 05:02:13 2020 +0000
Merge branch 'frozen-msystem-workaround' into 'meld-3-20'
win32: workaround startup error with MSYSTEM env
See merge request GNOME/meld!48
(cherry picked from commit c5257d6223f77edc81acd7291f8ef35ca12a6827)
23f84ea9 win32: workaround startup error with MSYSTEM env
bin/meld | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 2e60a46d..95282642 100755
--- a/bin/meld
+++ b/bin/meld
@@ -408,10 +408,20 @@ def setup_glib_logging():
def environment_hacks():
+ # MSYSTEM is set by git, and confuses our
+ # msys-packaged version's library search path -
+ # for frozen build the lib subdirectory is excluded.
+ # workaround it by adding as first path element.
+ # This may confuse vc utils run from meld
+ # but otherwise meld just crash on start, see #267
+
+ global frozen
+ if frozen and "MSYSTEM" in os.environ:
+ lib_dir = os.path.join(get_meld_dir(), "lib")
+ os.environ["PATH"] = lib_dir + os.pathsep + os.environ["PATH"]
# We manage cwd ourselves for git operations, and GIT_DIR in particular
- # can mess with this when set. MSYSTEM is set by git, and confuses our
- # msys-packaged version's library search path.
- for var in ('GIT_DIR', 'GIT_WORK_TREE', 'MSYSTEM'):
+ # can mess with this when set.
+ for var in ('GIT_DIR', 'GIT_WORK_TREE'):
try:
del os.environ[var]
except KeyError:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]