summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ytfzf-updates.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <[email protected]>2021-10-01 17:10:49 -0400
committerMaxim Cournoyer <[email protected]>2021-10-01 17:10:49 -0400
commit2e65e4834a226c570866f2e8976ed7f252b45cd1 (patch)
tree21d625bce8d03627680214df4a6622bf8eb79dc9 /gnu/packages/patches/ytfzf-updates.patch
parent9c68ecb24dd1660ce736cdcdea0422a73ec318a2 (diff)
parentf1a3c11407b52004e523ec5de20d326c5661681f (diff)
Merge remote-tracking branch 'origin/master' into staging
With resolved conflicts in: gnu/packages/bittorrent.scm gnu/packages/databases.scm gnu/packages/geo.scm gnu/packages/gnupg.scm gnu/packages/gstreamer.scm gnu/packages/gtk.scm gnu/packages/linux.scm gnu/packages/python-xyz.scm gnu/packages/xorg.scm guix/build/qt-utils.scm
Diffstat (limited to 'gnu/packages/patches/ytfzf-updates.patch')
-rw-r--r--gnu/packages/patches/ytfzf-updates.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/patches/ytfzf-updates.patch b/gnu/packages/patches/ytfzf-updates.patch
new file mode 100644
index 0000000000..40e7c138b0
--- /dev/null
+++ b/gnu/packages/patches/ytfzf-updates.patch
@@ -0,0 +1,44 @@
+From ceb6836cd31653267506957cd0ccf78046404d3b Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <[email protected]>
+Date: Mon, 5 Jul 2021 06:47:38 -0400
+Subject: [PATCH 2/2] Disable updates within the application.
+
+Patch the code responsible for self-updating the application.
+
+Co-authored-by: jgart <[email protected]>
+---
+ ytfzf | 18 ++----------------
+ 1 file changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/ytfzf b/ytfzf
+index f0f2e16..2d1bb2e 100755
+--- a/ytfzf
++++ b/ytfzf
+@@ -1260,22 +1260,8 @@ EOF
+ }
+
+ update_ytfzf () {
+- branch="$1"
+- updatefile="/tmp/ytfzf-update"
+- curl -L "https://raw.githubusercontent.com/pystardust/ytfzf/$branch/ytfzf" -o "$updatefile"
+-
+- if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh'; then
+- chmod 755 "$updatefile"
+- [ "$(uname)" = "Darwin" ] && prefix="/usr/local/bin" || prefix="/usr/bin"
+- function_exists "sudo" && doasroot="sudo" || doasroot="doas"
+- $doasroot cp "$updatefile" "$prefix/ytfzf"
+- unset prefix doasroot
+- else
+- printf "%bFailed to update ytfzf. Try again later.%b" "$c_red" "$c_reset"
+- fi
+-
+- rm "$updatefile"
+- exit 0
++ printf "%bUpdates have to be installed with Guix.%b\n" "$c_red" "$c_reset"
++ exit 1
+ }
+
+ #gives a value to sort by (this will give the unix time the video was uploaded)
+--
+2.32.0
+