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 655954 - gconf_entry_get_is_writable always return "TRUE" when checking gconf.xml.defaults
gconf_entry_get_is_writable always return "TRUE" when checking gconf.xml.defa...
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
3.1.x
Other Linux
: Normal major
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-04 09:29 UTC by Joey Zheng
Modified: 2011-09-07 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test_gconf_default writable. (1.14 KB, text/plain)
2011-08-04 09:29 UTC, Joey Zheng
  Details
force to return value even if value is NULL (488 bytes, patch)
2011-08-19 07:11 UTC, Joey Zheng
accepted-commit_now Details | Review

Description Joey Zheng 2011-08-04 09:29:56 UTC
Created attachment 193232 [details]
test_gconf_default writable.

This bug is original from https://bugzilla.novell.com/show_bug.cgi?GoAheadAndLogIn=1&id=705409, which states "gconf-editor will not set an entry to default".

After some debugs, I found that gconf_entry_get_is_writable() always return "TRUE". See attached application for the testing purpose.

I found that in gconf_entry_get_is_writable(), "entry" will be forced to convert to "GConfRealEntry" from "GConfEntry". By using gdb and dump the memory, I found that the int type value of "is_default" and "is_writeable" is "0xba 0xba 0xba 0xba". So the bit for "is_writable" is "1", which will let gconf_entry_get_is_writable return TRUE.

This blocks the feature of set_as_default, so I set to Major.
Comment 1 Joey Zheng 2011-08-19 07:08:11 UTC
I got the root cause. It is caused by that gconfd-dbus will not return any
message if there is no such entry in default xml. So I forced it to return even
if there is no such entry. So an "INVALID" value will be returned now.
In my test, it works.
Comment 2 Joey Zheng 2011-08-19 07:11:07 UTC
Created attachment 194187 [details] [review]
force to return value even if value is NULL
Comment 3 Vincent Untz 2011-09-06 18:13:14 UTC
The patch looks good and works fine here. Rob, can we push it?
Comment 4 Rob Bradford 2011-09-07 12:06:14 UTC
Review of attachment 194187 [details] [review]:

Looks good to me. I'll push it.
Comment 5 Rob Bradford 2011-09-07 12:45:46 UTC
commit 20090aab16ad2fa168afa33a7af5fe11ca73f297
Author: Joey Zheng <joey@jzheng.org>
Date:   Wed Sep 7 13:14:17 2011 +0100

    gconf-database-dbus: Allow setting the gconf values to the schema default
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=655954