r49383 - in /desktop/unstable/gconf/debian: changelog update-gconf-defaults

ah at users.alioth.debian.org ah at users.alioth.debian.org
Mon Aug 1 10:42:31 UTC 2016


Author: ah
Date: Mon Aug  1 10:42:30 2016
New Revision: 49383

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=49383
Log:
update-gconf-defaults: add support for lists of integers (Closes: #833131)

Modified:
    desktop/unstable/gconf/debian/changelog
    desktop/unstable/gconf/debian/update-gconf-defaults

Modified: desktop/unstable/gconf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/changelog?rev=49383&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gconf/debian/changelog	[utf-8] Mon Aug  1 10:42:30 2016
@@ -1,3 +1,10 @@
+gconf (3.2.6-4) UNRELEASED; urgency=medium
+
+  [ Raphael Geissert ]
+  * update-gconf-defaults: add support for lists of integers (Closes: #833131)
+
+ -- Andreas Henriksson <andreas at fatal.se>  Mon, 01 Aug 2016 12:31:50 +0200
+
 gconf (3.2.6-3) unstable; urgency=medium
 
   * Team upload.

Modified: desktop/unstable/gconf/debian/update-gconf-defaults
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/update-gconf-defaults?rev=49383&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/update-gconf-defaults	[utf-8] (original)
+++ desktop/unstable/gconf/debian/update-gconf-defaults	[utf-8] Mon Aug  1 10:42:30 2016
@@ -8,6 +8,8 @@
 
 import os,tempfile,shutil,sys
 from optparse import OptionParser
+
+import re
 
 parser = OptionParser()
 parser.add_option("--source", dest="source_dir", default="/usr/share/gconf/defaults",
@@ -64,13 +66,27 @@
 def string_entry(value):
   return '  <string>' + htmlescape(value) + '</string>\n'
 
+def int_list_entry(value):
+  ret = '  <list type="int">\n'
+  for v in value[1:-1].split(','):
+    ret += '    <value><int>' + v + '</int></value>\n'
+  ret += '  </list>\n'
+  return ret
+
 def list_entry(value):
+  if is_int_list(value):
+    return int_list_entry(value)
   ret = '  <list type="string">\n'
   for v in value[1:-1].split(','):
     ret += '    <value><string>' + htmlescape(v) + '</string></value>\n'
   ret += '  </list>\n'
   return ret
 
+def is_int_list(value):
+  if re.search('^\[(?:\d+,?)+\]$', value) == None:
+    return False
+  else:
+    return True
 
 def listcmp(a,b):
   """Number of starting similar elements in a and b"""




More information about the pkg-gnome-commits mailing list