After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606251 - Handle CORBA vs. D-Bus choice better
Handle CORBA vs. D-Bus choice better
Status: RESOLVED FIXED
Product: pyatspi2
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Willie Walker
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2010-01-06 19:05 UTC by Willie Walker
Modified: 2019-03-27 20:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Patch for at-spi module (CORBA) (1.77 KB, patch)
2010-01-06 19:05 UTC, Willie Walker
committed Details | Review
Patch for pyatspi2 module (D-Bus) (1.79 KB, patch)
2010-01-06 19:06 UTC, Willie Walker
none Details | Review

Description Willie Walker 2010-01-06 19:05:19 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.
Comment 1 Willie Walker 2010-01-06 19:06:21 UTC
Created attachment 150919 [details] [review]
Patch for pyatspi2 module (D-Bus)
Comment 2 Willie Walker 2010-01-06 19:25:57 UTC
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.
Comment 3 Vincent Untz 2010-01-07 10:23:03 UTC
FWIW, I think this new approach is saner :-) Thanks for working on it!
Comment 4 Willie Walker 2010-01-07 16:48:45 UTC
Comment on attachment 150918 [details] [review]
Patch for at-spi module (CORBA)

Committed for the GNOME 2.29.5 release.
Comment 5 Willie Walker 2010-01-07 16:48:57 UTC
Comment on attachment 150919 [details] [review]
Patch for pyatspi2 module (D-Bus)

Committed for the GNOME 2.29.5 release.