summary refs log tree commit diff
path: root/pkgs/applications/audio/gpodder
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-04-14 13:51:15 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-04-14 14:01:21 +0200
commitcd80cab3b058c9a4de6c59e91177aa6a1b9c1eca (patch)
tree6ca507abc226a9c473c695c8844812466ad2accd /pkgs/applications/audio/gpodder
parent027e6dd510f8b5f0e3113a52bf04fd90c2ffe51e (diff)
downloadnixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.tar
nixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.tar.gz
nixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.tar.bz2
nixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.tar.lz
nixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.tar.xz
nixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.tar.zst
nixpkgs-cd80cab3b058c9a4de6c59e91177aa6a1b9c1eca.zip
gpodder: disable auto-update
Diffstat (limited to 'pkgs/applications/audio/gpodder')
-rw-r--r--pkgs/applications/audio/gpodder/default.nix4
-rw-r--r--pkgs/applications/audio/gpodder/disable-autoupdate.patch55
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/applications/audio/gpodder/default.nix b/pkgs/applications/audio/gpodder/default.nix
index 37fd16323c7..79631156513 100644
--- a/pkgs/applications/audio/gpodder/default.nix
+++ b/pkgs/applications/audio/gpodder/default.nix
@@ -15,6 +15,10 @@ python3Packages.buildPythonApplication rec {
     sha256 = "0sx5z9qjl76fi0m8vmars0yasfaq6znq434d8zjwla22k5wflmwm";
   };
 
+  patches = [
+    ./disable-autoupdate.patch
+  ];
+
   postPatch = with stdenv.lib; ''
     sed -i -re 's,^( *gpodder_dir *= *).*,\1"'"$out"'",' bin/gpodder
   '';
diff --git a/pkgs/applications/audio/gpodder/disable-autoupdate.patch b/pkgs/applications/audio/gpodder/disable-autoupdate.patch
new file mode 100644
index 00000000000..8f77518d03e
--- /dev/null
+++ b/pkgs/applications/audio/gpodder/disable-autoupdate.patch
@@ -0,0 +1,55 @@
+--- a/share/gpodder/ui/gtk/menus.ui
++++ b/share/gpodder/ui/gtk/menus.ui
+@@ -13,10 +13,6 @@
+         <attribute name="action">app.gotoMygpo</attribute>
+         <attribute name="label" translatable="yes">Go to gpodder.net</attribute>
+       </item>
+-      <item>
+-        <attribute name="action">app.checkForUpdates</attribute>
+-        <attribute name="label" translatable="yes">Software updates</attribute>
+-      </item>
+     </section>
+     <section>
+       <item>
+@@ -201,4 +197,4 @@
+     </submenu>
+   </menu>
+ </interface>
+-<!-- :noTabs=true:tabSize=2:indentSize=2: -->
+\ No newline at end of file
++<!-- :noTabs=true:tabSize=2:indentSize=2: -->
+--- a/src/gpodder/config.py
++++ b/src/gpodder/config.py
+@@ -91,13 +91,6 @@
+         'retries': 3,  # number of retries when downloads time out
+     },
+ 
+-    # Software updates from gpodder.org
+-    'software_update': {
+-        'check_on_startup': True,  # check for updates on start
+-        'last_check': 0,  # unix timestamp of last update check
+-        'interval': 5,  # interval (in days) to check for updates
+-    },
+-
+     'ui': {
+         # Settings for the Command-Line Interface
+         'cli': {
+--- a/src/gpodder/gtkui/main.py
++++ b/src/gpodder/gtkui/main.py
+@@ -224,7 +224,7 @@
+             util.idle_add(self.subscribe_to_url, self.options.subscribe)
+         elif not self.channels:
+             self.on_itemUpdate_activate()
+-        elif self.config.software_update.check_on_startup:
++        elif False and self.config.software_update.check_on_startup:
+             # Check for software updates from gpodder.org
+             diff = time.time() - self.config.software_update.last_check
+             if diff > (60 * 60 * 24) * self.config.software_update.interval:
+@@ -3288,6 +3288,7 @@
+         If silent=False, a message will be shown even if no updates are
+         available (set silent=False when the check is manually triggered).
+         """
++        return
+         try:
+             up_to_date, version, released, days = util.get_update_info()
+         except Exception as e: