r32620 - in /desktop/unstable/d-conf/debian: changelog patches/02_update_ordering.patch patches/series
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Tue Feb 21 00:36:39 UTC 2012
Author: joss
Date: Tue Feb 21 00:36:38 2012
New Revision: 32620
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=32620
Log:
02_update_ordering.patch: new patch. When updating the databases,
read them in order and override values from early files with values
from later files. This allows one to set a key in 01-foo and
override it in 02-bar.
Added:
desktop/unstable/d-conf/debian/patches/02_update_ordering.patch
Modified:
desktop/unstable/d-conf/debian/changelog
desktop/unstable/d-conf/debian/patches/series
Modified: desktop/unstable/d-conf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/d-conf/debian/changelog?rev=32620&op=diff
==============================================================================
--- desktop/unstable/d-conf/debian/changelog [utf-8] (original)
+++ desktop/unstable/d-conf/debian/changelog [utf-8] Tue Feb 21 00:36:38 2012
@@ -3,6 +3,10 @@
* 01_env_path.patch: new patch. Allow to configure the dconf profiles
and databases path through the environment. Still defaults to
/etc/dconf.
+ * 02_update_ordering.patch: new patch. When updating the databases,
+ read them in order and override values from early files with values
+ from later files. This allows one to set a key in 01-foo and
+ override it in 02-bar.
-- Josselin Mouette <joss at debian.org> Sat, 28 Jan 2012 11:41:16 +0100
Added: desktop/unstable/d-conf/debian/patches/02_update_ordering.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/d-conf/debian/patches/02_update_ordering.patch?rev=32620&op=file
==============================================================================
--- desktop/unstable/d-conf/debian/patches/02_update_ordering.patch (added)
+++ desktop/unstable/d-conf/debian/patches/02_update_ordering.patch [utf-8] Tue Feb 21 00:36:38 2012
@@ -1,0 +1,73 @@
+Index: dconf-0.10.0/bin/dconf-update.vala
+===================================================================
+--- dconf-0.10.0.orig/bin/dconf-update.vala 2012-02-20 23:54:10.342034493 +0100
++++ dconf-0.10.0/bin/dconf-update.vala 2012-02-21 01:31:29.710581713 +0100
+@@ -41,17 +41,38 @@ unowned Gvdb.Item get_parent (Gvdb.HashT
+ return parent;
+ }
+
+-Gvdb.HashTable? read_locks_directory (string dirname) throws GLib.Error {
++string[]? list_directory (string dirname) throws GLib.Error {
++ var l = new SList<string> ();
+ var dir = Dir.open (dirname);
++ unowned string? name;
++ string[] entries = {};
+
+ if (dir == null) {
+ return null;
+ }
++ while ((name = dir.read_name ()) != null) {
++ l.insert_sorted (name, strcmp);
++ }
++ // Go through directories in reverse order.
++ // This is so that values in higher-numbered files take precedence.
++ l.reverse();
++
++ foreach (string s in l) {
++ entries += s;
++ }
++ return entries;
++}
++
++Gvdb.HashTable? read_locks_directory (string dirname) throws GLib.Error {
++ var entries = list_directory (dirname);
++
++ if (entries == null) {
++ return null;
++ }
+
+ var table = new Gvdb.HashTable ();
+- unowned string? name;
+
+- while ((name = dir.read_name ()) != null) {
++ foreach (var name in entries) {
+ var filename = Path.build_filename (dirname, name);
+ Posix.Stat buf;
+
+@@ -75,12 +96,10 @@ Gvdb.HashTable? read_locks_directory (st
+
+ Gvdb.HashTable read_directory (string dirname) throws GLib.Error {
+ var table = new Gvdb.HashTable ();
+- unowned string? name;
+
+ table.insert ("/");
+
+- var dir = Dir.open (dirname);
+- while ((name = dir.read_name ()) != null) {
++ foreach (var name in list_directory (dirname)) {
+ var filename = Path.build_filename (dirname, name);
+ Posix.Stat buf;
+
+@@ -194,11 +213,7 @@ void maybe_update_from_directory (string
+ }
+
+ void update_all (string dirname) throws GLib.Error {
+- unowned string? name;
+-
+- var dir = Dir.open (dirname);
+-
+- while ((name = dir.read_name ()) != null) {
++ foreach (var name in list_directory (dirname)) {
+ if (name.has_suffix (".d")) {
+ try {
+ maybe_update_from_directory (Path.build_filename (dirname, name));
Modified: desktop/unstable/d-conf/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/d-conf/debian/patches/series?rev=32620&op=diff
==============================================================================
--- desktop/unstable/d-conf/debian/patches/series [utf-8] (original)
+++ desktop/unstable/d-conf/debian/patches/series [utf-8] Tue Feb 21 00:36:38 2012
@@ -1,1 +1,2 @@
01_env_path.patch
+02_update_ordering.patch
More information about the pkg-gnome-commits
mailing list