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 > On Jun 21, 2026, at 14:46, 'Peter Fletcher' via weewx-user > <[email protected]> wrote: > > When I upgraded my workhorse Pi 3 to Trixie, I apt installed weewx (5.3.01), > using a working 5.0 .conf file from a Bookworm installation, and it has been > working fine for a month or so. Today, when I did my periodic sudo apt > update/sudo apt full-upgrade sequence, one of the upgrades pulled in was > weewx (to 5.4.01 - not 100% sure about the last digit). As usual, when weewx > is involved, in the course of the running of the apt upgrade, I was asked > which version of weewx.conf to use - there are three or four options, > includng the default 'keep existing version', which, again as usual, I > accepted. However, when weewx was restarted by apt, I noticed that it was > using a differently named .conf file (weewx.conf-5.0.0b16-5.4.0). weewx > started up normally, and the 'new' .conf file turns out to be a copy of my > original, with a change in the version parameter from 5.0.0b16 to 5.4.0 and a > couple of minor changes in some commented text. > In one sense, it can be argued that the upgrade did keep my old version of > weewx.conf - just under a new name! However, the potential problem with this > behavior, if I had not noticed the change, is that I might make a > modification to the original weewx.conf in the future and get very confused > by its not working! > I think that this represents a change in behavior, but it may not be a recent > one, since weewx wasn't apt installed on my bookworm system, and I think that > this is the first time it has been upgraded by apt on my Trixie system. Why > is "keep my existing weewx.conf" no longer being taken literally? -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/DF6733A7-8C3E-4293-AACF-C0F2C32F73AB%40gmail.com.
