]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_gconf
r1713: releasing version 4.2.19
[debhelper.git] / dh_gconf
index a7e0e41956113e6c383b67a6633c5613c4af61c0..19341af1c42defffe99e6c298a3d605578a59314 100755 (executable)
--- a/dh_gconf
+++ b/dh_gconf
@@ -19,24 +19,38 @@ dh_gconf is a debhelper program that is responsible for registering
 GConf schemas.
 
 It automatically generates the postinst and prerm fragments needed
-to register and unregister the schemas in etc/gconf/schemas.
+to register and unregister the schemas in usr/share/gconf/schemas.
 These fragements will use gconftool-2, so the package should depend on
-gconf2. This rogram will add an apprioriate dependency to ${misc:Depends}.
+gconf2. This program will add an appropriate dependency to ${misc:Depends}.
+
+The postinst script will also signal gconfd-2 so that the newly installed
+schemas are available straight away.
 
 =cut
 
 init();
 
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);
+       my $old_schemas_dir = "$tmp/etc/gconf/schemas";
+       my $new_schemas_dir = "$tmp/usr/share/gconf/schemas";
+
+       # Migrate schemas from /etc/gconf/schemas to /usr/share/gconf/schemas
+       if (-d $old_schemas_dir) {
+               doit("mkdir -p $new_schemas_dir") unless -d $new_schemas_dir;
+               doit("mv $old_schemas_dir/*.schemas $new_schemas_dir/");
+               doit("rmdir -p --ignore-fail-on-non-empty $old_schemas_dir");
+       }
 
-       if (-d "$tmp/etc/gconf/schemas") {
+       if (-d "$new_schemas_dir") {
                # Get a list of the schemas
-               my $schemas = `find debian/$package/etc/gconf/schemas -type f -name \*.schemas -printf '%P '`;
+               my $schemas = `find $new_schemas_dir -type f -name \\*.schemas -printf '%P '`;
                if ($schemas ne '') {
                        autoscript($package,"postinst","postinst-gconf","s%#SCHEMAS#%$schemas%");
                        autoscript($package,"prerm","prerm-gconf","s%#SCHEMAS#%$schemas%");
-                       addsubstvar($package, "misc:Depends", "gconf2 (>= 2.4.0)");
+                       autoscript($package,"postrm","postrm-gconf","s%#SCHEMAS#%$schemas%");
+                       addsubstvar($package, "misc:Depends", "gconf2 (>= 2.6.2-1)");
                }
        }
 }