I don’t know if the add-ons need to be installed or not. If it is then OH I think doesn’t download from the internet when installing add-ons and instead grabs it from the installed package. If you’ve installed the add-ons package, you’ll probably want to fix that package too.
Ok, it seems I managed to get it run
First I downgraded openhab:
openhabian@openhab:~ $ sudo apt-get install openhab=3.4.5-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
raspi-gpio raspinfo
Use ‘sudo apt autoremove’ to remove them.
The following held packages will be changed:
openhab
The following packages will be DOWNGRADED:
openhab
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 21 not upgraded.
Need to get 104 MB of archives.
After this operation, 129 kB of additional disk space will be used.
Do you want to continue? [Y/n]
…
Then the same with openhab-addons:
openhabian@openhab:~ $ sudo apt-get install openhab-addons=3.4.5-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
raspi-gpio raspinfo
Use ‘sudo apt autoremove’ to remove them.
The following packages will be DOWNGRADED:
openhab-addons
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 22 not upgraded.
Need to get 378 MB of archives.
After this operation, 15.4 MB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 JFrog stable/main armhf openhab-addons all 3.4.5-1 [378 MB]
Fetched 378 MB in 1min 1s (6,233 kB/s)
dpkg: warning: downgrading openhab-addons from 4.0.0-1 to 3.4.5-1
(Reading database … 63738 files and directories currently installed.)
Preparing to unpack …/openhab-addons_3.4.5-1_all.deb …
Unpacking openhab-addons (3.4.5-1) over (4.0.0-1) …
Setting up openhab-addons (3.4.5-1) …
Updating FireMotD available updates count …
Then I set both on hold:
openhabian@openhab:~ $ sudo apt-mark hold openhab
openhab set on hold.
openhabian@openhab:~ $ sudo apt-mark hold openhab-addons
openhab-addons set on hold.
openhabian@openhab:~ $ sudo apt-mark showhold
openhab
openhab-addons
The same upgrade to 4.0 happened to me. I followed Panicman’s advice, but no joy. In final desperation, I went to my backup “tapes” from a week earlier and restored all openhab directories. That worked. Then I locked version 3.4 down as per Panicman’s advice.
Worked for me too! At the beginning of the week, I went to do my usual update and suddenly found myself going from 3.4.5 to 4.0.2 and the system stopped working. Thanks to Rich Koshak and thanks to you for posting your solution steps here. Got my system back up and running again. Will now put my OH3 production systems on hold to prevent this from happening on them!
Unfortunately it didn’t remember „on hold“ after reboot
Update:
I have to correct my message. It happened after the manually update from 3.4.4-2 to 3.4.5-1
To avoid this in the future I have written a system script to run the hold statement before starting a weekly script to automatically run an system update.