the behavior for apt, yum, and zypper installs is the same. the only difference is that apt prompts, whereas yum and zypper do not. i am pretty sure that this behavior has not changed since this installation method was first introduced.
when you do an upgrade, these are the possible permutations of a conf file:
original - the 'original' config, i.e., the one before upgrade
dist - the new baseline config, i.e., what you would get if you did a new, clean install
merged - start with the new baseline config, then add in diffs from the original config.
for upgrades using yum/zypper:
weewx.conf - original config
weewx.conf-new - new conf for this weewx version
weewx.conf-old-new - original config 'upgraded' to new version
weewx.conf.rpmnew - new conf from this rpm (created by rpm rules)
for upgrades using apt:
if you choose existing:
weewx.conf - original config
weewx.conf.x.y.z - new config
if you choose new:
weewx.conf.dpkg-old - original config
weewx.conf - new config
when the upgrade happens, all three of these are saved to disk. a copy of one of the three is made and called 'weewx.conf'. that way you can compare in case anything went sideways. the file names should be self-explanatory, but after many upgrades it can be confusing, since there will be files left behind from each upgrade.
it is slightly more complicated with apt because debconf values are applied too.
it is ok for the installer to change the 'version' field, because it ostensibly knows what it is doing.
imho, the 'version' field in weewx.conf should be eliminated. in the best case it can be treated as a hint, as in "this might be the version of weewx that was installed when this config file was created". but it cannot be trusted, and it serves no purpose. the only way to trust a config file is to parse the whole thing and make sure it works.
we go out of our way to make upgrades to weewx *not* break when using an old config file. there *is* an option to 'upgrade' a config file, but that is rarely ever required.
btw, the mangling and insertion of comments when you choose to merge or upgrade a config file is a pain in the ass. any merge or upgrade should leave my comments (or lack thereof) and comment formatting alone. the mangline is largely due to the poor handling of comments by configobj, at various versions of configobj, and the developers' attempts to workaround the poor handling.
m