> Maybe it was just that the original code had to be at the 
> upgrade|install-upgrade
> block of the case?
> 
> But why is the -d /etc/squid3 checked?

I followed this two questions doing some tests on my system and it looks to
me as we should be happy with this patch:

--- /tmp/squid.preinst  2017-03-26 01:27:31.201012140 +0100
+++ debian/squid.preinst        2017-03-26 00:59:34.433577481 +0100
@@ -26,6 +26,8 @@
                /etc/squid3/errorpage.css /etc/squid/errorpage.css 3.5.4-1~ 
squid3 -- "$@"
 fi
 
+case "$1" in
+       upgrade|install-upgrade)
 #
 # If the squid (2.7) package was being used previously protect
 # the squid.conf file, which was not tracked as a conffile.
@@ -34,12 +36,9 @@
 # Except when a squid3 package was used, since we do want the
 # debconf questions to appear as the packages get merged.
 #
-if dpkg --compare-versions "$2" lt '2.8' && test -d /etc/squid3; then
+if dpkg --compare-versions "$2" lt '2.8'; then
        mv /etc/squid/squid.conf /etc/squid/squid.conf.pre3.5_upgrade
 fi
-
-case "$1" in
-       upgrade|install-upgrade)
                ;;
        abort-upgrade)
                exit 0

Which basically means to move the check to the upgrade|install-upgrade
section and remove the check for the squid3 dir.

My tests of both an upgrade from 2.7 and from jessie's squid3 work ok.

Amos, I don't know what your idea with this code was, so I'd like to talk
about it a bit before uploading a new version.

Regards.
-- 
Manty/BestiaTester -> http://manty.net

Reply via email to