Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Apitzsch <git@apitzsch.eu>2022-06-18 19:05:07 +0300
committerAndré Apitzsch <git@apitzsch.eu>2022-06-20 19:17:18 +0300
commit0fd5aa540366a1fc289c5e77e527c5b97c33b6d7 (patch)
tree3d22e0965d330d6eaf0971e07c42e430390cd94a
parent6df045cef3b9fdfafdb38433e985efd61dff1e36 (diff)
imprv: Disable plugin updates by Gajim on flatpak
There is no way for Gajim to update the plugins. Let flatpak handle this.
-rw-r--r--flatpak/app-overrides.json5
-rw-r--r--flatpak/org.gajim.Gajim.Devel.yaml3
-rw-r--r--flatpak/org.gajim.Gajim.yaml3
-rw-r--r--gajim/common/settings.py5
4 files changed, 15 insertions, 1 deletions
diff --git a/flatpak/app-overrides.json b/flatpak/app-overrides.json
new file mode 100644
index 000000000..20b7fc2a2
--- /dev/null
+++ b/flatpak/app-overrides.json
@@ -0,0 +1,5 @@
+{
+ "plugins_update_check": false,
+ "plugins_auto_update": false,
+ "plugins_repository_enabled": false
+}
diff --git a/flatpak/org.gajim.Gajim.Devel.yaml b/flatpak/org.gajim.Gajim.Devel.yaml
index 0700b65bb..b7d0249bf 100644
--- a/flatpak/org.gajim.Gajim.Devel.yaml
+++ b/flatpak/org.gajim.Gajim.Devel.yaml
@@ -317,11 +317,14 @@ modules:
build-commands:
- pip3 install .
- touch /app/share/run-as-flatpak
+ - cp -t ${FLATPAK_DEST} app-overrides.json
- echo -e '#!/bin/sh\ngajim --gapplication-app-id=org.gajim.Gajim.Devel "$@"' > /app/bin/gajim-devel
- chmod 755 /app/bin/gajim-devel
sources:
- type: git
url: https://dev.gajim.org/gajim/gajim.git
+ - type: file
+ path: app-overrides.json
- type: shell
commands:
- sed -i "s+<id>org.gajim.Gajim</id>+<id>org.gajim.Gajim.Devel</id>+" data/org.gajim.Gajim.appdata.xml.in
diff --git a/flatpak/org.gajim.Gajim.yaml b/flatpak/org.gajim.Gajim.yaml
index d85ea582e..c5da67ad6 100644
--- a/flatpak/org.gajim.Gajim.yaml
+++ b/flatpak/org.gajim.Gajim.yaml
@@ -311,9 +311,12 @@ modules:
build-commands:
- pip3 install .
- touch /app/share/run-as-flatpak
+ - cp -t ${FLATPAK_DEST} app-overrides.json
sources:
- type: git
url: https://dev.gajim.org/gajim/gajim.git
tag: 1.4.4
+ - type: file
+ path: app-overrides.json
post-install:
- install -d /app/plugins
diff --git a/gajim/common/settings.py b/gajim/common/settings.py
index eb1657426..1e51149cb 100644
--- a/gajim/common/settings.py
+++ b/gajim/common/settings.py
@@ -106,7 +106,10 @@ _SignalCallable = Callable[[Any, str, Optional[str], Optional[JID]], Any]
_CallbackDict = dict[tuple[str, Optional[str], Optional[JID]],
list[weakref.WeakMethod[_SignalCallable]]]
-OVERRIDES_PATH = Path('/etc/gajim/app-overrides.json')
+if app.is_flatpak():
+ OVERRIDES_PATH = Path('/app/app-overrides.json')
+else:
+ OVERRIDES_PATH = Path('/etc/gajim/app-overrides.json')
class Settings: