Horror upgrade from 4.10 to 5.0.2

473 views
Skip to first unread message

Invisible Man

unread,
Mar 3, 2024, 9:44:44 AM3/3/24
to weewx-user
I used to have weewx 4.10 running smoothly with Interceptor driver. I upgraded to 5.0.2
There are the logs, and I believe I have tons of issues.
I add the upgrading logs at the end.

First issue partially solved: the upgrade did not handle my /etc/default/weewx file and wasn't loading my config file. I fixed the /etc/default/weewx with this:

WEEWX_PYTHON=python3
WEEWX_BINDIR=/usr/share/weewx
WEEWX_CFG=/etc/weewx/weewx.conf
WEEWX_BIN=/usr/bin/weewx

Now, at least it's trying to do something. But it complains that No module named 'user'. I think that's because it is trying to run weewx as weewx user? Is that right?

So, I thought I needed to install the interceptor driver in the weewx user account.
The command is ./wee_extension --install interceptor.zip, except I only have wee_extension in /etc/weewx/scripts and those were scripts but without the +x executable permission... I added it.

It's not working.

$ ./wee_extension --install ~axelle/weewx-interceptor.zip
python3: can't open file '/usr/share/weewx/wee_extension': [Errno 2] No such file or directory

I'm no longer understanding where weewx has put its new files, thus my /etc/default/weewx file probably not correctly set. It's horrible mess. Where are things meant to be?

Thanks



Unpacking weewx (5.0.2-1) over (4.10.2-1) ...
dpkg: warning: unable to delete old directory '/usr/share/weewx/user': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/udev/rules.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard/smartphone/icons': Directory no
t empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard/smartphone': Directory not empt
y
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard/lang': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard/backgrounds': Directory not emp
ty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard/RSS': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard/NOAA': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Standard': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Smartphone/lang': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Smartphone/icons': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Smartphone': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Seasons/lang': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Seasons/font': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Seasons/NOAA': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Seasons': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Rsync': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Mobile/lang': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Mobile': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins/Ftp': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/skins': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/scripts': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/apache/conf.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/apache/conf-available': Directory not empty
dpkg: warning: unable to delete old directory '/etc/weewx/apache': Directory not empty
Setting up python3-ephem (3.7.6.0-7+b1) ...
Setting up weewx (5.0.2-1) ...
Installing new version of config file /etc/weewx/import/csv-example.conf ...
Installing new version of config file /etc/weewx/import/cumulus-example.conf ...
Installing new version of config file /etc/weewx/import/wd-example.conf ...
Installing new version of config file /etc/weewx/import/weathercat-example.conf ...
Installing new version of config file /etc/weewx/import/wu-example.conf ...
Installing new version of config file /etc/weewx/logrotate.d/weewx ...
Installing new version of config file /etc/weewx/rsyslog.d/weewx.conf ...

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] ?
Using weewx:weewx as user:group
Saving old defaults to /etc/default/weewx-20240303143336
Creating /etc/default/weewx
Creating maintainer config file as /etc/weewx/weewx.conf-4.10.2-5.0.2
Using configuration file /etc/weewx/weewx.conf-4.10.2-5.0.2
Finished upgrading configuration file /etc/weewx/weewx.conf-4.10.2-5.0.2
Saving configuration file /etc/weewx/weewx.conf-4.10.2-5.0.2
Migrating old extensions to /etc/weewx/bin/user
Saving old extensions to /usr/share/weewx/user-20240303143336
Adding system group weewx...done
Adding user axelle to group weewx
Installing systemd units
Installing udev rules
Configuring database directory /var/lib/weewx
Configuring reporting directory /var/www/html/weewx
Setting permissions weewx:weewx on /etc/weewx
Enabling startup using systemd
Synchronizing state of weewx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable weewx

Invisible Man

unread,
Mar 3, 2024, 10:22:47 AM3/3/24
to weewx-user
I downgraded back to 4.10. I will look into v5 later and calmly. This is not just "some small upgrade that'll work out of the box". So many things have changed like it's no longer wee_extension I see but weectl, and the daemon is running as weewx.
Is there an upgrade procedure from 4.10 to v5 somewhere? + like all the changes and new habits I should move to?

sudo apt install weewx=4.10.2-1
sudo apt-mark hold weewx

Thanks.

Tom Keffer

unread,
Mar 3, 2024, 10:25:14 AM3/3/24
to weewx...@googlegroups.com
It's all in the Upgrade Guide. Did you read it?

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/89dd7c83-b6f5-4bd7-bc7e-30f8c0fff478n%40googlegroups.com.

Invisible Man

unread,
Mar 3, 2024, 10:54:23 AM3/3/24
to weewx-user
Nice, no, that was exactly what I was looking for :)  Thanks! That'll help very much.

Just a pity that the upgrade went so bad. You expect an "apt upgrade" to run without any issue...

Tom Keffer

unread,
Mar 3, 2024, 11:10:37 AM3/3/24
to weewx...@googlegroups.com
From what I see in the log, the upgrade ran perfectly. The problem was that you tried to use the old V4 utility "wee_extension" to install an extension in a V5 environment. As explained in the Upgrade Guide, you need to use "weectl extension install".

I would not dismiss an upgrade as a "horror" if you haven't read the instructions. 

Invisible Man

unread,
Mar 3, 2024, 11:23:44 AM3/3/24
to weewx-user
This happened during system upgrade: apt update, apt upgrade.
When you do this, you do not read the Upgrade notes of each package you are upgrading - and you don't have access to them, because it is supposed to run correctly.
And it did not : it did not load my weewx.conf at all (that's in a previous post, but the issue is linked).
Now, yes, the way I fixed it was wrong, and that's why I preferred to downgrade, read the upgrade notes, and upgrade when I get more information.

So, to clarify things:
- No, it's not your fault, I'm not trying to blame anyone here, especially that you do a wonderful work
- It *was* a horror upgrade *for me*

michael.k...@gmx.at

unread,
Mar 3, 2024, 11:47:52 PM3/3/24
to weewx-user
I can comprehend you point of view, since I more than once did updates in a similar way. What I learned from the past, sometimes the hard way:
  • I always check the list of packages, that will be upgraded
  • when I encounter a package I know I customized configs, I think twice.
  • when such a package does a major version upgrade x.x => y.0, I definitely look for more info


Reply all
Reply to author
Forward
0 new messages