X-Git-Url: https://git.donarmstrong.com/?p=debhelper.git;a=blobdiff_plain;f=autoscripts%2Fpreinst-sgmlcatalog;h=96f06738bd0c0ce36daee300aedd37a270512b3a;hp=41f55d6ddfdc5f066c2e86217dfdeb9909ee6610;hb=b3c00de156adf9c52da3cd0fa7c46414d5eb6982;hpb=bf6781f75d757e674607a9bafd658e6f11fa3963 diff --git a/autoscripts/preinst-sgmlcatalog b/autoscripts/preinst-sgmlcatalog index 41f55d6..96f0673 100644 --- a/autoscripts/preinst-sgmlcatalog +++ b/autoscripts/preinst-sgmlcatalog @@ -1,7 +1,8 @@ -if [ "$1" = "upgrade" ] && ! dpkg-query -S #CENTRALCAT# >/dev/null 2>&1; then +if test -f #CENTRALCAT# -a "(" "$1" = "upgrade" -o "$1" = "install" -a -n "$2" ")" && + ! 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# + mv #CENTRALCAT# #CENTRALCAT#.old fi