unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 4343b2e8c159e977254e3b7b1d3d4a8fa0ca124f 1376 bytes (raw)
name: gnu/packages/patches/xpra-5.0-systemd-run.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
 
diff --git a/xpra/scripts/main.py b/xpra/scripts/main.py
index 3813331a5..46e2c83a6 100755
--- a/xpra/scripts/main.py
+++ b/xpra/scripts/main.py
@@ -337,23 +337,26 @@ def use_systemd_run(s) -> bool:
     cmd = ["systemd-run", "--quiet"]
     if getuid()!=0:
         cmd += ["--user"]
-    cmd += ["--scope", "--", "true"]
-    proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False)
     try:
-        proc.communicate(timeout=2)
-        r = proc.returncode
-    except TimeoutExpired:  # pragma: no cover
-        r = None
-    if r is None:
-        try:
-            proc.terminate()
-        except Exception:
-            pass
+        cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"]
+        proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False)
         try:
-            proc.communicate(timeout=1)
+            proc.communicate(timeout=2)
+            r = proc.returncode
         except TimeoutExpired:  # pragma: no cover
             r = None
-    return r==0
+        if r is None:
+            try:
+                proc.terminate()
+            except Exception:
+                pass
+            try:
+                proc.communicate(timeout=1)
+            except TimeoutExpired:  # pragma: no cover
+                r = None
+        return r==0
+    except FileNotFoundError:
+        return False
 
 def verify_gir():
     try:

debug log:

solving 4343b2e8c1 ...
found 4343b2e8c1 in https://yhetil.org/guix-patches/d38be952d6a6fecc658ef570dad55df98974664b.1695185457.git.atai@atai.org/ ||
	https://yhetil.org/guix-patches/d38be952d6a6fecc658ef570dad55df98974664b.1695106027.git.atai@atai.org/ ||
	https://yhetil.org/guix-patches/3311247b0b9368e217e37b7810e0a86f5f32c78c.1694404192.git.atai@atai.org/ ||
	https://yhetil.org/guix-patches/CAJsg1E_4GhMMqhAmkPcY+qwmPv8pukJJUSRu_pj0-8jqdQsgjA@mail.gmail.com/ ||
	https://yhetil.org/guix-patches/5940d9f96a58bcb948f54adabe6fac6cd64f68e3.1695355042.git.atai@atai.org/
found 8dfd9c82f0 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 8dfd9c82f0c9d052e82277d44dd67214f4d732fe	gnu/packages/patches/xpra-4.2-systemd-run.patch

applying [1/1] https://yhetil.org/guix-patches/d38be952d6a6fecc658ef570dad55df98974664b.1695185457.git.atai@atai.org/
diff --git a/gnu/packages/patches/xpra-4.2-systemd-run.patch b/gnu/packages/patches/xpra-5.0-systemd-run.patch
similarity index 66%
rename from gnu/packages/patches/xpra-4.2-systemd-run.patch
rename to gnu/packages/patches/xpra-5.0-systemd-run.patch
index 8dfd9c82f0..4343b2e8c1 100644

Checking patch gnu/packages/patches/xpra-4.2-systemd-run.patch => gnu/packages/patches/xpra-5.0-systemd-run.patch...
Applied patch gnu/packages/patches/xpra-4.2-systemd-run.patch => gnu/packages/patches/xpra-5.0-systemd-run.patch cleanly.

skipping https://yhetil.org/guix-patches/d38be952d6a6fecc658ef570dad55df98974664b.1695106027.git.atai@atai.org/ for 4343b2e8c1
skipping https://yhetil.org/guix-patches/3311247b0b9368e217e37b7810e0a86f5f32c78c.1694404192.git.atai@atai.org/ for 4343b2e8c1
skipping https://yhetil.org/guix-patches/CAJsg1E_4GhMMqhAmkPcY+qwmPv8pukJJUSRu_pj0-8jqdQsgjA@mail.gmail.com/ for 4343b2e8c1
skipping https://yhetil.org/guix-patches/5940d9f96a58bcb948f54adabe6fac6cd64f68e3.1695355042.git.atai@atai.org/ for 4343b2e8c1
index at:
100644 4343b2e8c159e977254e3b7b1d3d4a8fa0ca124f	gnu/packages/patches/xpra-5.0-systemd-run.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).