gconf:first release

This commit is contained in:
alihanozturk
2016-06-12 21:38:52 +03:00
parent aa49e9944e
commit 5c485d5674
7 changed files with 608 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import piksemel
import os
def installGconfSchemas(filepath):
os.environ['GCONF_CONFIG_SOURCE'] = 'xml:merged:/etc/gconf/gconf.xml.defaults'
parse = piksemel.parse(filepath)
schemas = []
for schema in parse.tags("File"):
path = schema.getTagData("Path")
if path.startswith("etc/gconf/schemas"):
schemas.append("/"+path)
if schemas:
os.system("/usr/bin/gconftool-2 --makefile-install-rule %s" % " ".join(schemas))
def uninstallGconfSchemas(filepath):
os.environ['GCONF_CONFIG_SOURCE'] = 'xml:merged:/etc/gconf/gconf.xml.defaults'
parse = piksemel.parse(filepath)
schemas = []
for schema in parse.tags("File"):
path = schema.getTagData("Path")
if path.startswith("etc/gconf/schemas"):
schemas.append("/"+path)
if schemas:
os.system("/usr/bin/gconftool-2 --makefile-uninstall-rule %s" % " ".join(schemas))
def setupPackage(metapath, filepath):
installGconfSchemas(filepath)
def cleanupPackage(metapath, filepath):
uninstallGconfSchemas(filepath)
def postCleanupPackage(metapath, filepath):
pass