summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-05-28 13:40:05 -0400
committerJoey Hess <joey@kitenet.net>2012-05-28 13:46:14 -0400
commit0ecce5d6f0ea6e7fd91216bb293d8ec769172c4c (patch)
tree5fb30299e7d6321e61bd4bb08ed3b9c58ce11075 /autoscripts
parentbad9a3274d4390ea70bf0de97eea1fbe6500f045 (diff)
dh_installcatalogs: Turn /etc/sgml/$package.cat into conffiles and introduce dependency on trigger-based sgml-base. Closes: #477751 Thanks, Helmut Grohne
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