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 670494 - dconf update reads files in random order
dconf update reads files in random order
Status: RESOLVED FIXED
Product: dconf
Classification: Core
Component: general
0.10.x
Other Linux
: Normal normal
: ---
Assigned To: dconf-maint
dconf-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-21 00:51 UTC by Josselin Mouette
Modified: 2012-03-19 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dconf update: read files in reverse alphabetical order (2.08 KB, patch)
2012-02-21 00:51 UTC, Josselin Mouette
none Details | Review
dconf update: Read keyfiles in a defined order (8.55 KB, patch)
2012-03-19 15:03 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Josselin Mouette 2012-02-21 00:51:32 UTC
Created attachment 208074 [details] [review]
dconf update: read files in reverse alphabetical order

When "dconf update" is used to generate a database based on several entry files, as suggested by GDM developers, files are read in random order, which makes it impossible to override a setting set in one file with another one.

This patch fixes this by reading files in a predictable order. Since already set values are ignored, they have to be read in a reverse order so that files named with a higher prefix take precedence over files named with a lower one.
Comment 1 Allison Karlitskaya (desrt) 2012-03-19 15:03:03 UTC
Created attachment 210092 [details] [review]
dconf update: Read keyfiles in a defined order

This patch is a substantial cleanup of the 'dconf update' command.  The
biggest 'clean up' aspect is less dependence on catch-all 'throws'
clauses and better error messages for specific failures.

The cleanup also brings a new feature: keyfiles are now read in a
pre-defined order so that keys defined in higher-numbered files have
precedence over low-numbered files (ie: if the same key is in a file
'10_a' and '20_b' then '20_b' will "win").  This portion of the patch is
based on a patch from Josselin Mouette.
Comment 2 Allison Karlitskaya (desrt) 2012-03-19 15:35:03 UTC
Comment on attachment 210092 [details] [review]
dconf update: Read keyfiles in a defined order

Attachment 210092 [details] pushed as eae99c6 - dconf update: Read keyfiles in a defined order