all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 3328af32b90c9748d1871c19b73257211efeda73 901 bytes (raw)
name: gnu/packages/patches/quickswitch-fix-dmenu-check.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
 
Fix Debian-specific check for dmenu.

See <https://github.com/proxypoke/quickswitch-for-i3/pull/28>.

--- quickswitch-for-i3-2.2/quickswitch.py	2016-09-18 19:59:10.257765542 +0200
+++ quickswitch-for-i3-2.2/quickswitch.py	2016-09-19 11:00:51.147101323 +0200
@@ -37,11 +37,14 @@
 
 def check_dmenu():
     '''Check if dmenu is available.'''
-    devnull = open(os.devnull)
-    retcode = subprocess.call(["which", "dmenu"],
-                              stdout=devnull,
-                              stderr=devnull)
-    return True if retcode == 0 else False
+    with open(os.devnull, 'w') as devnull:
+        try:
+            retcode = subprocess.call(["dmenu", "-v"],
+                                      stdout=devnull,
+                                      stderr=devnull)
+            return retcode == 0
+        except OSError:
+            return False
 
 
 def dmenu(options, dmenu):

debug log:

solving 3328af3 ...
found 3328af3 in https://yhetil.org/guix/20160919124500.GA19342@sax.terramar.selidor.net/

applying [1/1] https://yhetil.org/guix/20160919124500.GA19342@sax.terramar.selidor.net/
diff --git a/gnu/packages/patches/quickswitch-fix-dmenu-check.patch b/gnu/packages/patches/quickswitch-fix-dmenu-check.patch
new file mode 100644
index 0000000..3328af3

1:14: trailing whitespace.
 
1:30: trailing whitespace.
 
1:31: trailing whitespace.
 
Checking patch gnu/packages/patches/quickswitch-fix-dmenu-check.patch...
Applied patch gnu/packages/patches/quickswitch-fix-dmenu-check.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 3328af32b90c9748d1871c19b73257211efeda73	gnu/packages/patches/quickswitch-fix-dmenu-check.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.