Many opkg packages missing - compared to OpenWRT

For example, base OpenWRT has had usbreset package for many years: https://github.com/openwrt/openwrt/blob/master/package/utils/usbreset/Makefile

Turris Omnia 5 doesn’t have it:

turris# opkg find '*usbreset*'
turris#

This applies to many packages. For example: luci-proto-mbim, util-linux, and more.

Is it possible to get Turris OS up to date with upstream OpenWRT? Or can I simply add an official OpenWRT repo as a source, without breaking anything?

Mmmh, I just did:

root@turris:~# opkg update
Downloading https://repo.turris.cz/hbs/omnia/packages/core/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_core
Downloading https://repo.turris.cz/hbs/omnia/packages/core/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/base/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_base
Downloading https://repo.turris.cz/hbs/omnia/packages/base/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/cesnet/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_cesnet
Downloading https://repo.turris.cz/hbs/omnia/packages/cesnet/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_luci
Downloading https://repo.turris.cz/hbs/omnia/packages/luci/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/node/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_node
Downloading https://repo.turris.cz/hbs/omnia/packages/node/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/openwisp/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_openwisp
Downloading https://repo.turris.cz/hbs/omnia/packages/openwisp/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_packages
Downloading https://repo.turris.cz/hbs/omnia/packages/packages/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_routing
Downloading https://repo.turris.cz/hbs/omnia/packages/routing/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/sidn/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_sidn
Downloading https://repo.turris.cz/hbs/omnia/packages/sidn/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_telephony
Downloading https://repo.turris.cz/hbs/omnia/packages/telephony/Packages.sig
Signature check passed.
Downloading https://repo.turris.cz/hbs/omnia/packages/turrispackages/Packages.gz
Updated list of available packages in /var/opkg-lists/turrisos_turrispackages
Downloading https://repo.turris.cz/hbs/omnia/packages/turrispackages/Packages.sig
Signature check passed.
root@turris:~# opkg find usbreset
usbreset - 5 - This package contains the small usbreset utility which
 can be used to send a USB port reset to a USB device -
 useful for debugging or to force re-detection of particular
 devices.
root@turris:~#

What am I missing?

Looks like you’re not missing anything. The question is - why was I missing it? I ran opkg update so many times today. Heck, I can see in my terminal history that usbreset wasn’t present two opkg update runs ago. But well, I rerun it. And usbreset shows up now.

And here’s the ultimate reason why it wasn’t showing up. You have to execute opkg update after each reboot. Otherwise, only installed packages will show on opkg list. Not those available in the repos.

1 Like

Nice hint, thanks mate. It is now obvious why, but i did not know about it. So it is maybe good idea to put opkg update command into /etc/rc.local.

OpenWrt recompiles the packages regularly, so you really want need fresh package lists…
Doing this after each reboot just wears down the flash without giving you necessarily uptodate usable lists when you finally want to use them, well unless yoy reboot daily :wink:

Why should it wear down flash? Package list cash should somewhere go to ramdisk, right?
But you are right, one would want fresh lists for the moment you need them.

1 Like

Yes, you are right because they are stored in the ramdisk (to reduce flask writes) they are lost on every reboot. Thanks for clearing this up.

I think best solution would be to update package lists once per day using cron, that way they are up to date.