Skip to content

faq questions apt get asks

Tom Keffer edited this page Sep 13, 2024 · 4 revisions

Question asked when upgrading WeeWX

This relatively confusing question is asked by the Debian packaging system:

Configuration file '/etc/weewx/weewx.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** weewx.conf (Y/I/N/O/D/Z) [default=N] ?

If you answer 'N' (the default):

Usually, the safest choice is the default: keep your current version of weewx.conf. This works well, because we try hard to make sure that configuration files are upwardly compatible, so old files can be run with newer version of WeeWX without problem.

If you make this choice, exactly what happens next will depend on which version you are upgrading from. But, the following is typical:

Using weewx:weewx as user:group
Adding system group weewx...done
Adding system user weewx...done
Adding user ubuntu to group weewx
Installing udev rules
Creating maintainer config file as /etc/weewx/weewx.conf-4.10.2-5.1.0
Using configuration file /etc/weewx/weewx.conf-4.10.2-5.1.0
Finished upgrading configuration file /etc/weewx/weewx.conf-4.10.2-5.1.0
Saving configuration file /etc/weewx/weewx.conf-4.10.2-5.1.0
Migrating old extensions to /etc/weewx/bin/user
Saving old extensions to /usr/share/weewx/user-20240913054043
Configuring database directory /var/lib/weewx
Configuring reporting directory /var/www/html/weewx
Setting permissions weewx:weewx on /etc/weewx
Installing systemd units
Enabling startup using systemd
Starting weewxd using systemd

If you answer 'Y' or 'I':

This choice does not use your old weewx.conf. Instead, it replaces it with a brand new version. However, it does keep any settings made when you installed WeeWX initially such as station location and what driver to use. Any other weewx.conf edits, such as any extensions that you installed, or special reports that you requested, will not be transferred over.

Having said that, apt-get, or, more precisely, the utility dpkg that apt-get uses, will save your previous copy of weewx.conf as weewx.conf.dpkg-old which can then be used to compare to your new weewx.conf, allowing you to manually edit it.

This is a good example of why taking the 'N' default is generally the best way to upgrade.

If you make this choice, here is a typical output to expect:


Installing new version of config file /etc/weewx/weewx.conf ...
Found 0 running instances of weewxd
Using weewx:weewx as user:group
Adding system group weewx...done
Adding system user weewx...done
Adding user ubuntu to group weewx
Installing udev rules
Using debconf configuration values from previous install
Using configuration file /etc/weewx/weewx.conf
Processing configuration file /etc/weewx/weewx.conf
Saving configuration file /etc/weewx/weewx.conf
Migrating old extensions to /etc/weewx/bin/user
Saving old extensions to /usr/share/weewx/user-20240913071757
Configuring database directory /var/lib/weewx
Configuring reporting directory /var/www/html/weewx
Setting permissions weewx:weewx on /etc/weewx
Installing systemd units
Enabling startup using systemd
Starting weewxd using systemd
Clone this wiki locally