module-gsettings: new module to store configuration using gsettings

System Internals / PulseAudio - Sylvain Baubeau [] - 19 April 2018 11:30 EDT

GConf is deprecated, and distributions are removing it. paprefs depends on GConf, so in order to avoid paprefs getting removed as well, paprefs has to be changed to use something else than GConf. GSettings is the easiest alternative to migrate to, although it has the same problems that GConf had: no support for system mode or networking.

This patch takes the non-GConf specific code from module-gconf and puts it in stdin-util.[ch], which is then reused by module-gsettings. module-gsettings is designed to be very similar to module-gconf.

Migration is expected to happen as follows: Distributions update PulseAudio and paprefs at the same time, or first PulseAudio and then paprefs. paprefs depends on module-gsettings, and module-gsettings conflicts with module-gconf. Therefore module-gconf gets automatically removed during the paprefs update. After the update an old PulseAudio is likely to be running with module-gconf loaded. If the user tries to use paprefs during this period, whatever the user does in paprefs won't have any effect until PulseAudio is restarted (probably by a reboot or relogin). This is not ideal, but will have to do.

When module-gsettings is loaded, it runs gsettings-data-convert (implemented in a later patch). That will copy the settings from GConf to GSettings. If gsettings-data-convert is not available (it's part of GConf, so it may have already been uninstalled), then any previous paprefs settings are lost.

785b660d module-gsettings: new module to store configuration using gsettings | 20 ++
src/ | 31 ++-
src/modules/gconf/module-gconf.c | 292 +--------------------
src/modules/gsettings/gsettings-helper.c | 117 +++++++++
src/modules/gsettings/module-gsettings.c | 110 ++++++++
.../org.freedesktop.pulseaudio.gschema.xml | 98 +++++++
src/modules/stdin-util.c | 281 ++++++++++++++++++++
src/modules/stdin-util.h | 89 +++++++
8 files changed, 747 insertions(+), 291 deletions(-)


  • Share