On 26/03/2017 1:34 p.m., Santiago Garcia Mantinan wrote: >> 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? >
IIRC this is for transitions where _both_ squid and squid3 packages are already installed. Including the odd situation where a squid3 package is partially installed, which apt seems to like doing. The root cause of our troubles AFAICT is that the old 2.x "squid" packages do not register their squid.conf as a conffile. So in the debci testing dpkg has no way to know that there were no changes to the 2.7 default config file when upgrading wheezy->stretch. That was the initial bug 801654 problem about constantly asking to preserve changes. So... the current squid package unconditionally preserves any old squid.conf, goes on to install and register the 3.5+ squid.conf.default file as its baseline conffile. Then slips the old squid.conf into place as if it had gone through a normal conffile upgrade with no questions, always preserving the 'old' version squid.conf. That much seems to be working as intended for upgrades. But I/we wrongly assumed the --compare-versions would return false if there was no previous version. Amos