Is there any option in updater to disable local packages removal?
I’ve recompiled some of my OpenWRT packages with Omnia buildroot and installed just after first router configuration.
After then I’ve ran updater.sh, which removed all of my locally installed packages.
Now I have automatic updates disabled, because all of those packages are needed to service hardware connected to router. But would like to enable it back…
I compiled the SoftEther package and installed it successfully on the Turris Omnia - and it was also removed by the updater.
At the moment I need only this one additional package - so I made an ugly hack.
I installed the package, listed the files in the package
copied all the files into a temp directory
removed the package
moved the files from the temp directory to their original location
So the updater does not see an unwanted package and will not remove the files. Works since two weeks nicely with updater running.
As soon as updater has the functionality to tolerate locally installed packages I would just install the package again. This should then bring the system back in a normal state.
New updater version is released now. Just install package updater-ng. It should
have version 47. Then reinstall your local package (run install again). That
should be all and you should be be able to enable automatic updates again.
Hi @cynerd, what do I have to do? After “opkg update” neither “opkg install updater-ng” nor “opkg upgrade updater.ng” does the job. Running “updater.sh” bring the message: “uci: Entry not found”.
Sorry for hinting you too early. I confused routers and give you hint to early. I will repeat when release will really be released.
To explain I wasn’t at work today and my router send me notification about the update. But it wasn’t my home router, but my router at work. Sorry for that.
Anyway commands you described should be enough to update Updater to new version after update is released.
Well said. Yes it’s true. But I don’t have just one router :-). And just because of that I misinterpreted which router sent email and thought that it is already released, when it isn’t. Because I received notification about update, but not from router that is in final (public) branch.
Once again sorry to for early noitice.
Does the new version of updater also stop it from reinstalling packages that have been manually removed, or provide a way to block certain packages from being automatically installed?
Yes new version will support way of uninstalling installed packages. But not yet by just using opkg remove. You will have to edit /etc/updater/user.lua as described here: Updater failing (conflicts?)
root@turris:/tmp# wget https://api.turris.cz/openwrt-repo/omnia-test/packages/turrispackages/updater-ng_47_mvebu.ipk
root@turris:/tmp# opkg install updater-ng_47_mvebu.ipk
Upgrading updater-ng on root from 31 to 47…
Configuring updater-ng.
grep: ./etc/services_wanted: No such file or directory
grep: ./usr/lib/opkg/info/base-files.list: No such file or directory
Collected errors:
resolve_conffiles: Existing conffile /etc/config/updater is different from the conffile in the new package. The new conffile will be placed at /etc/config/updater-opkg.
Warning: Locally installed packages will be removed with the next automatic update!
updater.sh
INFO:Queue install of updater-ng/turris/31
At first. Installing anything from test is not supported and will never be. So better be patient and wait for release.
And now to your problem. You are installing new version of updater, but using old wrapper script. This means that, as you are warned, locally installed packages are not yet supported. So updater doesn’t know about this locally installed package and as first it updates you back to known version. That’s why I explicitly stated that you must reinstall locally installed packages after updater update. Which means for you install it twice.
To make sure that it isn’t seen as bug, let me explain here primary difference between Updater and standard package managers like opkg or apt and so on. Those are expected to be run by user and when they are not sure they ask him. Normally it means that they print error message and fail. User it self is required to fix it. This can happen even if you are not installing any new software, just during updates. This is specially prevalent for rolling release distributions. Because updater runs in background on device that is not probably often maintained and is expected to run years long without reinstall it has to be more hands off and robust than standard packages managers. This comes in cost of some limiting features that should ensure that updater will be able to update system even without user attention. Locally installed packages can break this and that is why their support is kind of limited and wasn’t implemented at first (although planned). And that is why repositories are preferred solution, because there is expectation that those will be updated, but local package can’t be updated and it might even freeze system components on some old version if you specify unfortunate dependencies.