summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-sgmlcatalog7
-rw-r--r--autoscripts/postrm-sgmlcatalog2
-rw-r--r--autoscripts/preinst-sgmlcatalog7
-rw-r--r--autoscripts/prerm-sgmlcatalog3
4 files changed, 8 insertions, 11 deletions
diff --git a/autoscripts/postinst-sgmlcatalog b/autoscripts/postinst-sgmlcatalog
deleted file mode 100644
index 100dee2f..00000000
--- a/autoscripts/postinst-sgmlcatalog
+++ /dev/null
@@ -1,7 +0,0 @@
-if [ "$1" = "configure" ]; then
- rm -f #CENTRALCAT#
- for ordcat in #ORDCATS#; do
- update-catalog --quiet --add #CENTRALCAT# ${ordcat}
- done
- update-catalog --quiet --add --super #CENTRALCAT#
-fi
diff --git a/autoscripts/postrm-sgmlcatalog b/autoscripts/postrm-sgmlcatalog
index 168a6949..f8278e68 100644
--- a/autoscripts/postrm-sgmlcatalog
+++ b/autoscripts/postrm-sgmlcatalog
@@ -1,3 +1,3 @@
if [ "$1" = "purge" ]; then
- rm -f #CENTRALCAT# #CENTRALCAT#.old
+ rm -f #CENTRALCAT#.old
fi
diff --git a/autoscripts/preinst-sgmlcatalog b/autoscripts/preinst-sgmlcatalog
new file mode 100644
index 00000000..41f55d6d
--- /dev/null
+++ b/autoscripts/preinst-sgmlcatalog
@@ -0,0 +1,7 @@
+if [ "$1" = "upgrade" ] && ! dpkg-query -S #CENTRALCAT# >/dev/null 2>&1; then
+ # If the dpkg-query command returns non-zero, the central catalog is
+ # not owned by any package. This is due to an old behaviour of
+ # debhelper. Now that file becomes a conffile. In order to avoid a
+ # question during installation, we remove the old non-conffile.
+ rm -f #CENTRALCAT#
+fi
diff --git a/autoscripts/prerm-sgmlcatalog b/autoscripts/prerm-sgmlcatalog
deleted file mode 100644
index d6f6fa7a..00000000
--- a/autoscripts/prerm-sgmlcatalog
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then
- update-catalog --quiet --remove --super #CENTRALCAT#
-fi