GNOME Bugzilla – Bug 670494
dconf update reads files in random order
Last modified: 2012-03-19 15:38:50 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.
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 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