[dconf] dconf update: don't warn on a key set twice



commit 2bbdd581dcb97e61ed29edcfdee92da8f2d1758a
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Mar 19 11:07:33 2012 -0400

    dconf update: don't warn on a key set twice
    
    It is expected that users may have the same key set multiple times if
    they use separate files in an 'override' type of situation.  In this
    case the higher-numbered file wins and we should silently ignore the key
    set in the lower-numbered file.
    
    This silences the warning message that we previously issued in that
    case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=664288

 bin/dconf-update.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/bin/dconf-update.vala b/bin/dconf-update.vala
index 28a1713..1517e78 100644
--- a/bin/dconf-update.vala
+++ b/bin/dconf-update.vala
@@ -136,8 +136,10 @@ Gvdb.HashTable read_directory (string dirname) {
 					var path = "/" + group + "/" + key;
 
 					if (table.lookup (path) != null) {
-						stderr.printf ("%s: [%s]: %s: ignoring duplicate definition of key %s\n",
-									   filename, group, key, path);
+						/* We process the files in reverse alphabetical order.  If the key is already set then
+						 * it must have been set from a file with higher precedence so we should ignore this
+						 * one.
+						 */
 						continue;
 					}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]