# HG changeset patch # User Goffi # Date 1561311937 -7200 # Node ID 2602c690806b16a31e622e74b16881d94d618200 # Parent 15d1ddcd78cfca44955244d160bf9dd8ef21c69b flatpak (sat_wrapper): don't use packages from $HOME in PYTHONPATH to avoid conflicts: before this change, packages from ~/.local/lib/python2.7/site-packages when included, and this could conflict with the ones from Flatpak, resulting in unwanted side effects (e.g. OMEMO not available). diff -r 15d1ddcd78cf -r 2602c690806b flatpak/sat_wrapper.py --- a/flatpak/sat_wrapper.py Sun Jun 23 18:14:15 2019 +0200 +++ b/flatpak/sat_wrapper.py Sun Jun 23 19:45:37 2019 +0200 @@ -11,6 +11,12 @@ const_INT_PREFIX = "org.salutatoi.SAT" const_OBJ_PATH = '/org/salutatoi/SAT/bridge' +# we remove any path with "/home" from PYTHONPATH because we have +# "--filesystem=home" permission and packages in .local/lib/python2.7/site-packages may +# conflict with the ones from flatpak +clean_pythonpath = ':'.join(p for p in sys.path if p and not p.startswith('/home')) +os.environ['PYTHONPATH'] = clean_pythonpath +os.environ['PYTHONNOUSERSITE'] = '1' try: sessions_bus = dbus.SessionBus()