Index: dconf-0.10.0/bin/dconf-update.vala
===================================================================
--- dconf-0.10.0.orig/bin/dconf-update.vala	2011-08-04 00:07:20.000000000 +0200
+++ dconf-0.10.0/bin/dconf-update.vala	2012-01-28 11:25:49.279081784 +0100
@@ -211,7 +211,15 @@ void update_all (string dirname) throws
 
 void dconf_update (string[] args) {
 	try {
-		update_all ("/etc/dconf/db");
+		if (args[2] != null) {
+			update_all (args[2]);
+		} else {
+			var dirname = GLib.Environment.get_variable ("DCONF_DIR");
+			if (dirname == null) {
+				dirname = "/etc/dconf";
+			}
+			update_all (Path.build_filename (dirname, "db"));
+		}
 	} catch (GLib.Error e) {
 		stderr.printf ("fatal: %s\n", e.message);
 	}
Index: dconf-0.10.0/bin/dconf.vala
===================================================================
--- dconf-0.10.0.orig/bin/dconf.vala	2011-09-11 18:44:19.000000000 +0200
+++ dconf-0.10.0/bin/dconf.vala	2012-01-28 11:32:10.180943921 +0100
@@ -56,7 +56,7 @@ void show_help (bool requested, string?
 
 		case "update":
 			description = "Update the system dconf databases";
-			synopsis = "";
+			synopsis = "[DIR]";
 			break;
 
 		case "watch":
@@ -117,7 +117,9 @@ Use 'dconf help COMMAND' to get detailed
 				str.append ("  KEY       A key path (starting, but not ending with '/')\n");
 			}
 
-			if ("PATH" in synopsis || "DIR" in synopsis) {
+			if ("[DIR]" in synopsis ) {
+				str.append ("  DIR       Directory containing the databases to update\n");
+			} else if ("PATH" in synopsis || "DIR" in synopsis) {
 				str.append ("  DIR       A directory path (starting and ending with '/')\n");
 			}
 
Index: dconf-0.10.0/engine/dconf-engine.c
===================================================================
--- dconf-0.10.0.orig/engine/dconf-engine.c	2011-09-11 21:07:26.000000000 +0200
+++ dconf-0.10.0/engine/dconf-engine.c	2012-01-28 11:44:48.492651117 +0100
@@ -176,7 +176,10 @@ dconf_engine_refresh_system (DConfEngine
 
       if (engine->gvdbs[i] == NULL)
         {
-          gchar *filename = g_build_filename ("/etc/dconf/db",
+          const gchar *dconf_dir = g_getenv ("DCONF_DIR");
+          if (dconf_dir == NULL)
+            dconf_dir = "/etc/dconf";
+          gchar *filename = g_build_filename (dconf_dir, "db",
                                               engine->names[i], NULL);
           engine->gvdbs[i] = gvdb_table_new (filename, TRUE, NULL);
           if (engine->gvdbs[i] == NULL)
@@ -223,7 +226,10 @@ dconf_engine_load_profile (const gchar
   char line[80];
   FILE *f;
 
-  filename = g_build_filename ("/etc/dconf/profile", profile, NULL);
+  const gchar *dconf_dir = g_getenv ("DCONF_DIR");
+  if (dconf_dir == NULL)
+    dconf_dir = "/etc/dconf";
+  filename = g_build_filename (dconf_dir, "profile", profile, NULL);
   f = fopen (filename, "r");
 
   if (f == NULL)
