Disable systemd-run if the command is not found. diff -Naur xpra-4.0.1/xpra/scripts/main.py xpra-4.0.1.patched/xpra/scripts/main.py --- xpra-4.0.1/xpra/scripts/main.py 2020-05-17 18:12:15.000000000 +0200 +++ xpra-4.0.1.patched/xpra/scripts/main.py 2020-06-01 12:12:18.500257507 +0200 @@ -312,16 +312,18 @@ if not is_systemd_pid1(): return False #test it: - cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] - proc = Popen(cmd, stdin=None, stdout=None, stderr=None, shell=False) - r = pollwait(proc, timeout=1) - if r is None: - try: - proc.terminate() - except Exception: - pass - return r==0 - + try: + cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] + proc = Popen(cmd, stdin=None, stdout=None, stderr=None, shell=False) + r = pollwait(proc, timeout=1) + if r is None: + try: + proc.terminate() + except Exception: + pass + return r==0 + except FileNotFoundError: + return False def run_mode(script_file, error_cb, options, args, mode, defaults): #configure default logging handler: >treecommitdiff
path: root/tests/print.scm
AgeCommit message (Expand)Author
2022-09-29import: print: Quasiquote properties...* guix/import/print.scm (package->code): Quasiquote properties. * tests/print.scm (pkg-with-properties, pkg-with-properties-source): New variables. ("package with properties"): New test Signed-off-by: Ludovic Courtès <ludo@gnu.org> itd
2021-11-17Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-11-11import: print: Replace packages and origins in 'arguments'....* guix/import/print.scm (package->code)[variable-reference] [object->code]: New procedures. [package-lists->code]: Rewrite in terms of 'object->code'. Pass the 'arguments' field through 'object->code'. * tests/print.scm (pkg-with-arguments, pkg-with-arguments-source): New variables. ("package with arguments"): New test. Ludovic Courtès
2021-11-11import: print: Handle patches that are origins....* guix/import/print.scm (package->code)[source->code]: Handle patches that are origins. * tests/print.scm (pkg-with-origin-input): Add 'patches' field. (pkg-with-origin-patch, pkg-with-origin-patch-source): New variables. ("package with origin patch"): New test. Ludovic Courtès
2021-11-11import: print: Correctly handle URI lists....* guix/import/print.scm (package->code)[factorized-uri-code]: New procedure. [source->code]: Use it, and factorize URI when it's a list. * tests/print.scm (pkg-with-origin-input): Check origin URI to a list. Ludovic Courtès
2021-11-11import: print: Properly render packages with origins as inputs....* guix/import/print.scm (package->code)[source->code]: Check whether VERSION is true before calling 'factorize-uri'. [package-lists->code]: Add clause for inputs that are origins. * tests/print.scm (pkg-with-origin-input, pkg-with-origin-input-source): New variables. ("package with origin input"): New test. Ludovic Courtès
2021-07-11import: print: Emit new-style package inputs when possible....* guix/import/print.scm (redundant-input-labels?): New procedure. (package->code)[package-lists->code]: Rename to... [inputs->code]: ... this. When 'redundant-input-labels?' returns true, emit label-less inputs. Adjust callers to new name. * tests/print.scm (pkg-with-inputs): Adjust accordingly. Ludovic Courtès