GNOME Bugzilla – Bug 606251
Handle CORBA vs. D-Bus choice better
Last modified: 2019-03-27 20:11:11 UTC
Created attachment 150918 [details] [review] Patch for at-spi module (CORBA) Choosing between the CORBA and D-Bus pyatspi modules is currently handled in kind of a hacky fashion, which is to use a Python *.pth file to set the Python directory path to point to the desired version. The problem with the current solution is that *all* python processes end up processing the *.pth file, which is undesirable. An alternative solution that isolates the choice to just consumers of the pyatspi module would be better. The attached patches modify the CORBA pyatspi and D-Bus pyatspi modules to keep things more isolated to pyatspi. The summary of the changes are as follows: The CORBA pyatspi module will be installed to a Python module called "pyatspi_corba". The D-Bus pyatspi module will be installed to the normal "pyatspi" module. The D-Bus pyatspi module will use the /desktop/gnome/interface/at-spi-corba gconf boolean to determine if it should replace sys.modules['pyatspi'] with the pyatspi_corba module or not. This scheme seems to work well in testing. NOTE that this requires changes to the at-spi and pyatspi2 modules, hence there are two patches. NOTE ALSO that distributions that do not wish to worry about file system compatibility between the CORBA and D-Bus versions of AT-SPI can use the --disable-relocate flag when building the CORBA version. The --disable-relocate flag builds/installs the CORBA version of AT-SPI as was done in GNOME 2.28.x and earlier.
Created attachment 150919 [details] [review] Patch for pyatspi2 module (D-Bus)
I'm adding Luke, Vincent, and Matthias since is something distributions should be aware of. The summary is this: 1) As a distribution, you can pretend AT-SPI/D-Bus doesn't exist by using the --disable-relocate option when building the at-spi package. This will put all the CORBA-based files in the place they were for GNOME 2.28.x and earlier. Note that these locations will conflict with the D-Bus locations, however. 2) As a distribtion, you can ship both the CORBA and D-Bus packages if you just build and install using the default configure flags. By default, the D-Bus form will be used. A user can specify that the CORBA form can be used by setting the gconf boolean /desktop/gnome/interface/at-spi-corba to True. Note that /desktop/gnome/interface/accessibility still remains as the high order bit that says whether a11y should be turned on or off for either version. Modulo the Python *.pth change that the patches for this bug eliminate, the content at http://live.gnome.org/AccessibilityCORBAToDBusMapping should also be relatively accurate. NOTE that bug #606254 also needs to be addressed to more effectively handle distributions that want to ship with /desktop/gnome/interface/at-spi-corba set to True by default. Currently, we have a situation where the CORBA at-spi-registryd will always launch if /desktop/gnome/interface/at-spi-corba is True. We only want it to launch if both /desktop/gnome/interface/at-spi-corba and /desktop/gnome/interface/accessibility are True.
FWIW, I think this new approach is saner :-) Thanks for working on it!
Comment on attachment 150918 [details] [review] Patch for at-spi module (CORBA) Committed for the GNOME 2.29.5 release.
Comment on attachment 150919 [details] [review] Patch for pyatspi2 module (D-Bus) Committed for the GNOME 2.29.5 release.