From 06b40b29a6aa2aaf47c96de4abd5504be1ff40a9 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 12 Jul 2004 15:59:03 +0000 Subject: [PATCH] r1703: * dh_cgonf: deal with problems if /etc/gconf/schemas doesn't exist any more (#258901) --- autoscripts/postrm-gconf | 11 +++++++---- dh_gconf | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/autoscripts/postrm-gconf b/autoscripts/postrm-gconf index 10a47fd..c05eb43 100644 --- a/autoscripts/postrm-gconf +++ b/autoscripts/postrm-gconf @@ -1,7 +1,10 @@ if [ "$1" = purge ]; then + OLD_DIR=/etc/gconf/schemas SCHEMA_FILES="#SCHEMAS#" - for SCHEMA in $SCHEMA_FILES; do - rm -f /etc/gconf/schemas/$SCHEMA - done - rmdir -p --ignore-fail-on-non-empty /etc/gconf/schemas + if [ -d $OLD_DIR ]; then + for SCHEMA in $SCHEMA_FILES; do + rm -f $OLD_DIR/$SCHEMA + done + rmdir -p --ignore-fail-on-non-empty $OLD_DIR + fi fi diff --git a/dh_gconf b/dh_gconf index 769dfa7..33d8394 100755 --- a/dh_gconf +++ b/dh_gconf @@ -40,7 +40,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { 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 --ignore-fail-on-non-empty $old_schemas_dir"); + doit("rmdir -p --ignore-fail-on-non-empty $old_schemas_dir"); } if (-d "$new_schemas_dir") { -- 2.39.5