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 626106 - Mapping values during migration
Mapping values during migration
Status: RESOLVED WONTFIX
Product: GConf
Classification: Deprecated
Component: gsettings
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GConf Maintainers
GConf Maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2010-08-05 13:01 UTC by Tomas Bzatek
Modified: 2018-08-17 13:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example of non-functional aliasing on value setting (932 bytes, text/plain)
2010-08-05 13:03 UTC, Tomas Bzatek
Details

Description Tomas Bzatek 2010-08-05 13:01:44 UTC
With current gsettings-data-convert, it's just a dumb gconf read & gsettings write of the same data type. Nowadays most packages makes use of new enum and flags types. In that case, to stay 100% strict with the API, we should read a string value from gconf and set a integer value using g_settings_set_enum(). 

Though it's possible to use g_settings_set_string() on enum-type key, it only works when correct string is passed in (nicknames as defined in <enum> section in schema definition). But in most cases the strings are not equal with old GConf schemas. It's possible to define aliases within the gsettings schema files but currently dconf makes no use of the when setting a value. Making it work would solve the first problem.

The second problem, mapping gconf' int value to gsettings' uint is not always possible, e.g. with negative numbers.

In both cases an assertion is thrown:
(lt-gsettings-data-convert:27369): GLib-GIO-CRITICAL **: g_settings_set_value: assertion `g_settings_range_check (&info, value)' failed

This is fine with gsettings-data-convert, it just continues to next record in the input convert file. That way we can convert as much as possible and hope for good values in gconf.
Comment 1 Tomas Bzatek 2010-08-05 13:03:06 UTC
Created attachment 167189 [details]
Example of non-functional aliasing on value setting
Comment 2 Bastien Nocera 2010-10-05 09:35:09 UTC
I committed the patch to bug 630419, so there's bound to be some enums listed in there to convert to GSettings.
Comment 3 Kjartan Maraas 2011-05-25 12:57:50 UTC
Can we close this one then?
Comment 4 André Klapper 2018-08-17 13:59:14 UTC
GConf has been deprecated since 2011.

GConf is not under active development anymore. Its codebase has been archived:
https://gitlab.gnome.org/Archive/gconf/commits/master

dconf and gsettings are its successors. See https://developer.gnome.org/gio/stable/ch34.html and https://developer.gnome.org/GSettings/ for porting info.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of dconf/gsettings. Thanks!