orca: 47.3 → 48.beta

https://gitlab.gnome.org/GNOME/orca/-/compare/47.3...48.beta

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>

+51 -56
+47 -52
pkgs/by-name/or/orca/fix-paths.patch
··· 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 1 + diff --git a/src/orca/ax_utilities_application.py b/src/orca/ax_utilities_application.py 2 + index 60c172f78..e8dadf76d 100644 3 + --- a/src/orca/ax_utilities_application.py 4 + +++ b/src/orca/ax_utilities_application.py 5 + @@ -189,7 +189,7 @@ class AXUtilitiesApplication: 7 6 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)) 13 - 14 - @@ -547,7 +547,7 @@ def getCmdline(pid): 15 - return cmdline 16 - 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() 7 + pid = AXUtilitiesApplication.get_process_id(app) 8 + try: 9 + - state = subprocess.getoutput(f"cat /proc/{pid}/status | grep State") 10 + + state = subprocess.getoutput(f"@cat@ /proc/{pid}/status | @grep@ State") 11 + state = state.split()[1] 12 + except Exception as error: 13 + tokens = [f"AXUtilitiesApplication: Exception checking state of pid {pid}: {error}"] 14 + diff --git a/src/orca/debugging_tools_manager.py b/src/orca/debugging_tools_manager.py 15 + index 740f1a690..85f74d2dc 100644 16 + --- a/src/orca/debugging_tools_manager.py 17 + +++ b/src/orca/debugging_tools_manager.py 18 + @@ -243,7 +243,7 @@ class DebuggingToolsManager: 19 + else: 20 + name = AXObject.get_name(app) or "[DEAD]" 21 + try: 22 + - cmdline = subprocess.getoutput(f"cat /proc/{pid}/cmdline") 23 + + cmdline = subprocess.getoutput(f"@cat@ /proc/{pid}/cmdline") 24 + except Exception as error: 25 + cmdline = f"EXCEPTION: {error}" 26 + else: 23 27 diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in 24 - index c3b23dec2..320597ae6 100755 28 + index 6cb4c7772..903b344f0 100755 25 29 --- a/src/orca/orca_bin.py.in 26 30 +++ b/src/orca/orca_bin.py.in 27 - @@ -63,7 +63,7 @@ class ListApps(argparse.Action): 28 - name = "[DEAD]" 29 - 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(): 31 + @@ -186,7 +186,7 @@ def inGraphicalDesktop(): 37 32 def otherOrcas(): 38 33 """Returns the pid of any other instances of Orca owned by this user.""" 39 34 ··· 43 38 stdout=subprocess.PIPE).stdout 44 39 pids = openFile.read() 45 40 diff --git a/src/orca/orca_modifier_manager.py b/src/orca/orca_modifier_manager.py 46 - index 48c0dead5..8a4a04e74 100644 41 + index 3407be009..452297a3f 100644 47 42 --- a/src/orca/orca_modifier_manager.py 48 43 +++ b/src/orca/orca_modifier_manager.py 49 - @@ -200,7 +200,7 @@ class OrcaModifierManager: 50 - debug.printMessage(debug.LEVEL_INFO, msg, True) 44 + @@ -230,7 +230,7 @@ class OrcaModifierManager: 45 + debug.print_message(debug.LEVEL_INFO, msg, True) 51 46 52 47 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() 48 + - with subprocess.Popen(["xkbcomp", os.environ["DISPLAY"], "-"], 49 + + with subprocess.Popen(["@xkbcomp@", os.environ["DISPLAY"], "-"], 50 + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) as p: 51 + self._original_xmodmap, _ = p.communicate() 57 52 self._create_orca_xmodmap() 58 - @@ -232,7 +232,7 @@ class OrcaModifierManager: 53 + @@ -262,7 +262,7 @@ class OrcaModifierManager: 59 54 return 60 55 61 56 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) 57 + - with subprocess.Popen(["xkbcomp", "-w0", "-", os.environ["DISPLAY"]], 58 + + with subprocess.Popen(["@xkbcomp@", "-w0", "-", os.environ["DISPLAY"]], 59 + stdin=subprocess.PIPE, stdout=None, stderr=None) as p: 60 + p.communicate(self._original_xmodmap) 66 61 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')) 62 + @@ -325,7 +325,7 @@ class OrcaModifierManager: 63 + debug.print_message(debug.LEVEL_INFO, msg, True) 64 + 65 + 66 + - with subprocess.Popen(["xkbcomp", "-w0", "-", os.environ["DISPLAY"]], 67 + + with subprocess.Popen(["@xkbcomp@", "-w0", "-", os.environ["DISPLAY"]], 68 + stdin=subprocess.PIPE, stdout=None, stderr=None) as p: 69 + p.communicate(bytes('\n'.join(lines), 'UTF-8')) 75 70 else:
+4 -4
pkgs/by-name/or/orca/package.nix
··· 18 18 dbus, 19 19 xkbcomp, 20 20 procps, 21 - lsof, 21 + gnugrep, 22 22 coreutils, 23 23 gsettings-desktop-schemas, 24 24 speechd-minimal, ··· 29 29 30 30 python3.pkgs.buildPythonApplication rec { 31 31 pname = "orca"; 32 - version = "47.3"; 32 + version = "48.beta"; 33 33 34 34 format = "other"; 35 35 36 36 src = fetchurl { 37 37 url = "mirror://gnome/sources/orca/${lib.versions.major version}/orca-${version}.tar.xz"; 38 - hash = "sha256-GwsUW7aFzXTso+KMt7cJf5jRPuHMWLce3u06j5BFIxs="; 38 + hash = "sha256-aY9LD2KtXJm5lcJg1rZnCIp1d9YIk5vfQzNTMIlQ10c="; 39 39 }; 40 40 41 41 patches = [ 42 42 (replaceVars ./fix-paths.patch { 43 43 cat = "${coreutils}/bin/cat"; 44 - lsof = "${lsof}/bin/lsof"; 44 + grep = "${gnugrep}/bin/grep"; 45 45 pgrep = "${procps}/bin/pgrep"; 46 46 xkbcomp = "${xkbcomp}/bin/xkbcomp"; 47 47 })