r13077 - in /desktop/unstable/gconf2/debian: changelog gconf-schemas
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Fri Oct 12 12:35:16 UTC 2007
Author: joss
Date: Fri Oct 12 12:35:16 2007
New Revision: 13077
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=13077
Log:
* Add a "--register-all" option to gconf-schemas, to rebuild the GConf
defaults database from scratch.
Modified:
desktop/unstable/gconf2/debian/changelog
desktop/unstable/gconf2/debian/gconf-schemas
Modified: desktop/unstable/gconf2/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf2/debian/changelog?rev=13077&op=diff
==============================================================================
--- desktop/unstable/gconf2/debian/changelog (original)
+++ desktop/unstable/gconf2/debian/changelog Fri Oct 12 12:35:16 2007
@@ -1,3 +1,10 @@
+gconf2 (2.20.0-2) UNRELEASED; urgency=low
+
+ * Add a "--register-all" option to gconf-schemas, to rebuild the GConf
+ defaults database from scratch.
+
+ -- Josselin Mouette <joss at debian.org> Fri, 12 Oct 2007 14:34:38 +0200
+
gconf2 (2.20.0-1) unstable; urgency=low
[ Sebastien Bacher ]
Modified: desktop/unstable/gconf2/debian/gconf-schemas
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf2/debian/gconf-schemas?rev=13077&op=diff
==============================================================================
--- desktop/unstable/gconf2/debian/gconf-schemas (original)
+++ desktop/unstable/gconf2/debian/gconf-schemas Fri Oct 12 12:35:16 2007
@@ -15,32 +15,47 @@
parser.add_option("--unregister", action="store_false", dest="register",
help="unregister schemas from the GConf database",
default=None)
+parser.add_option("--register-all", action="store_true", dest="register_all",
+ help="clean up the GConf database and register all schemas again",
+ default=False)
(options, args) = parser.parse_args()
-if options.register==None:
+if options.register==None and not options.register_all:
parser.error("You need to specify --register or --unregister.")
schema_location="/usr/share/gconf/schemas"
+defaults_dest="/var/lib/gconf/defaults"
schemas = [ ]
-for schema in args:
- if not os.path.isabs(schema):
- schema=os.path.join(schema_location,schema)
- if os.path.isfile(schema):
- schemas.append(schema)
- else:
- sys.stderr.write('Warning: %s could not be found.\n'%schema)
+if options.register_all:
+ for f in os.listdir(schema_location):
+ if f.endswith(".schemas"):
+ schemas.append(os.path.join(schema_location,f))
+else:
+ for schema in args:
+ if not os.path.isabs(schema):
+ schema=os.path.join(schema_location,schema)
+ if os.path.isfile(schema):
+ schemas.append(schema)
+ else:
+ sys.stderr.write('Warning: %s could not be found.\n'%schema)
if len(schemas)<1:
- parser.error("You need to give at least a file to (un)register.")
+ parser.error("You need at least a file to (un)register.")
if os.geteuid():
parser.error("You must be root to launch this program.")
+if options.register_all:
+ options.register=True
+ for f in os.listdir(defaults_dest):
+ os.remove(os.path.join(defaults_dest,f))
+ open(os.path.join(defaults_dest,"%gconf-tree.xml"),"w").close()
+
tmp_home=tempfile.mkdtemp(prefix='gconf-')
env={'HOME': tmp_home,
- 'GCONF_CONFIG_SOURCE': 'xml:readwrite:/var/lib/gconf/defaults'}
+ 'GCONF_CONFIG_SOURCE': 'xml:readwrite:'+defaults_dest}
if options.register:
arg='--makefile-install-rule'
else:
More information about the pkg-gnome-commits
mailing list