nixos/filesystems: don't silently ignore label when device is set (#361418)
[NixPkgs.git] / pkgs / by-name / or / orca / fix-paths.patch
blob8f713de296d6e2e5c6a0b546445b6cc68af9a5d5
1 diff --git a/src/orca/debug.py b/src/orca/debug.py
2 index e17e2333e..595c8489d 100644
3 --- a/src/orca/debug.py
4 +++ b/src/orca/debug.py
5 @@ -529,7 +529,7 @@ def traceit(frame, event, arg):
6 return traceit
8 def getOpenFDCount(pid):
9 - procs = subprocess.check_output([ 'lsof', '-w', '-Ff', '-p', str(pid)])
10 + procs = subprocess.check_output([ '@lsof@', '-w', '-Ff', '-p', str(pid)])
11 procs = procs.decode('UTF-8').split('\n')
12 files = list(filter(lambda s: s and s[0] == 'f' and s[1:].isdigit(), procs))
14 @@ -547,7 +547,7 @@ def getCmdline(pid):
15 return cmdline
17 def pidOf(procName):
18 - openFile = subprocess.Popen(f'pgrep {procName}',
19 + openFile = subprocess.Popen(f'@pgrep@ {procName}',
20 shell=True,
21 stdout=subprocess.PIPE).stdout
22 pids = openFile.read()
23 diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in
24 index c3b23dec2..320597ae6 100755
25 --- a/src/orca/orca_bin.py.in
26 +++ b/src/orca/orca_bin.py.in
27 @@ -63,7 +63,7 @@ class ListApps(argparse.Action):
28 name = "[DEAD]"
30 try:
31 - cmdline = subprocess.getoutput('cat /proc/%s/cmdline' % pid)
32 + cmdline = subprocess.getoutput('@cat@ /proc/%s/cmdline' % pid)
33 except Exception:
34 cmdline = '(exception encountered)'
35 else:
36 @@ -199,7 +199,7 @@ def inGraphicalDesktop():
37 def otherOrcas():
38 """Returns the pid of any other instances of Orca owned by this user."""
40 - openFile = subprocess.Popen('pgrep -u %s -x orca' % os.getuid(),
41 + openFile = subprocess.Popen('@pgrep@ -u %s -x orca' % os.getuid(),
42 shell=True,
43 stdout=subprocess.PIPE).stdout
44 pids = openFile.read()
45 diff --git a/src/orca/orca_modifier_manager.py b/src/orca/orca_modifier_manager.py
46 index 48c0dead5..8a4a04e74 100644
47 --- a/src/orca/orca_modifier_manager.py
48 +++ b/src/orca/orca_modifier_manager.py
49 @@ -200,7 +200,7 @@ class OrcaModifierManager:
50 debug.printMessage(debug.LEVEL_INFO, msg, True)
52 self.unset_orca_modifiers(reason)
53 - p = subprocess.Popen(['xkbcomp', os.environ['DISPLAY'], '-'],
54 + p = subprocess.Popen(['@xkbcomp@', os.environ['DISPLAY'], '-'],
55 stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
56 self._original_xmodmap, _ = p.communicate()
57 self._create_orca_xmodmap()
58 @@ -232,7 +232,7 @@ class OrcaModifierManager:
59 return
61 self._caps_lock_cleared = False
62 - p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']],
63 + p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']],
64 stdin=subprocess.PIPE, stdout=None, stderr=None)
65 p.communicate(self._original_xmodmap)
67 @@ -293,7 +293,7 @@ class OrcaModifierManager:
68 if modified:
69 msg = "ORCA MODIFIER MANAGER: Updating xmodmap"
70 debug.printMessage(debug.LEVEL_INFO, msg, True)
71 - p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']],
72 + p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']],
73 stdin=subprocess.PIPE, stdout=None, stderr=None)
74 p.communicate(bytes('\n'.join(lines), 'UTF-8'))
75 else: