all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 1790b7a2386e6bc558404a5342bf3b6dd886f4c7 1299 bytes (raw)
name: gnu/packages/patches/ytfzf-updates.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
From 75bf4f584866a013d5618ea6be19e97a8196d63e Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
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 <jgart@dismail.de>
---
 ytfzf | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/ytfzf b/ytfzf
index 0a2c372..845e8e9 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


debug log:

solving 1790b7a238 ...
found 1790b7a238 in https://yhetil.org/guix/20210705111425.14479-2-rg@raghavgururajan.name/ ||
	https://yhetil.org/guix/20210705151002.24052-2-rg@raghavgururajan.name/

applying [1/1] https://yhetil.org/guix/20210705111425.14479-2-rg@raghavgururajan.name/
diff --git a/gnu/packages/patches/ytfzf-updates.patch b/gnu/packages/patches/ytfzf-updates.patch
new file mode 100644
index 0000000000..1790b7a238

1:25: trailing whitespace.
 
1:46: trailing whitespace.
 
1:48: trailing whitespace.
-- 
Checking patch gnu/packages/patches/ytfzf-updates.patch...
1:50: new blank line at EOF.
+
Applied patch gnu/packages/patches/ytfzf-updates.patch cleanly.
warning: 4 lines add whitespace errors.

skipping https://yhetil.org/guix/20210705151002.24052-2-rg@raghavgururajan.name/ for 1790b7a238
index at:
100644 1790b7a2386e6bc558404a5342bf3b6dd886f4c7	gnu/packages/patches/ytfzf-updates.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.