Why are kmod packages hosted in 2 different directories on the OpenWRT update server?

Kmods source #1: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/
Kmods source #2: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/[vermagic]/

Currently I have snapshot version r25402-012be0468c installed.
Kernel v6.1.79-1

root@OpenWrt:~# grep kmods /etc/opkg/distfeeds.conf
src/gz openwrt_kmods https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/6.1.79-1-4a3c1cd3a4e65473dcdef01a32cbb597

Problem:

root@OpenWrt:~# opkg list | grep kmod-veth
kmod-veth - 6.1.79-1 - This device is a local ethernet tunnel. Devices are created in pairs. When one end receives the packet it appears on its pair and vice versa.
kmod-veth - 6.1.80-1 - This device is a local ethernet tunnel. Devices are created in pairs. When one end receives the packet it appears on its pair and vice versa.

root@OpenWrt:~# opkg find kmod-veth
kmod-veth - 6.1.80-1 - This device is a local ethernet tunnel. Devices are created in pairs.
 When one end receives the packet it appears on its pair and vice
 versa.
kmod-veth - 6.1.79-1 - This device is a local ethernet tunnel. Devices are created in pairs.
 When one end receives the packet it appears on its pair and vice
 versa.

root@OpenWrt:~# opkg install kmod-veth
Installing kmod-veth (6.1.79-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/6.1.79-1-4a3c1cd3a4e65473dcdef01a32cbb597/kmod-veth_6.1.79-1_aarch64_cortex-a53.ipk
Configuring kmod-veth.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.1.80-1-fd2f742ddeb44e3f2995551acef9c9db) for kmod-veth

Additional info:

root@OpenWrt:~# opkg info kmod-veth
Package: kmod-veth
Version: 6.1.80-1
Depends: kernel (= 6.1.80-1-fd2f742ddeb44e3f2995551acef9c9db)
Status: unknown ok not-installed
Section: kernel
Architecture: aarch64_cortex-a53
Size: 12639
Filename: kmod-veth_6.1.80-1_aarch64_cortex-a53.ipk
Description: This device is a local ethernet tunnel. Devices are created in pairs.
 When one end receives the packet it appears on its pair and vice
 versa.

Package: kmod-veth
Version: 6.1.79-1
Depends: kernel (= 6.1.79-1-4a3c1cd3a4e65473dcdef01a32cbb597)
Status: install user installed
Section: kernel
Architecture: aarch64_cortex-a53
Size: 12636
Filename: kmod-veth_6.1.79-1_aarch64_cortex-a53.ipk
Description: This device is a local ethernet tunnel. Devices are created in pairs.
 When one end receives the packet it appears on its pair and vice
 versa.
Installed-Time: 1709898953

root@OpenWrt:~# opkg depends -A kmod-veth
kmod-veth depends on:
        kernel (= 6.1.80-1-fd2f742ddeb44e3f2995551acef9c9db)
kmod-veth depends on:
        kernel (= 6.1.79-1-4a3c1cd3a4e65473dcdef01a32cbb597)

File /tmp/opkg-lists/openwrt-core contain this lines:

Package: kmod-veth
Version: 6.1.80-1
Depends: kernel (=6.1.80-1-fd2f742ddeb44e3f2995551acef9c9db)
License: GPL-2.0
Section: kernel
Architecture: aarch64_cortex-a53
Installed-Size: 40960
Filename: kmod-veth_6.1.80-1_aarch64_cortex-a53.ipk
Size: 12639
SHA256sum: 64fa479f259d14d69aabbefb430285762768aece57eb114143fd490897547030
Description:  This device is a local ethernet tunnel. Devices are created in pairs.
 When one end receives the packet it appears on its pair and vice
 versa.

File /tmp/opkg-lists/openwrt-kmods contain this lines:

Package: kmod-veth
Version: 6.1.79-1
Depends: kernel (=6.1.79-1-4a3c1cd3a4e65473dcdef01a32cbb597)
License: GPL-2.0
Section: kernel
Architecture: aarch64_cortex-a53
Installed-Size: 40960
Filename: kmod-veth_6.1.79-1_aarch64_cortex-a53.ipk
Size: 12636
SHA256sum: 2125df9bb33e1640d78b26179547e01deac22f10bf11511bd2c57f2a67cc3296
Description:  This device is a local ethernet tunnel. Devices are created in pairs.
 When one end receives the packet it appears on its pair and vice
 versa. 

https://openwrt.org/faq/cannot_satisfy_dependencies solution 4 might be worth reading.

I have previously familiarized myself with this information. And there is no answer to my question.
My question is not from a user, but from a developer.
I don’t understand why kmod packages are duplicated.

The version specific directory is supposed to be a long term archive for kmods tied to a specific kernel version as the main repo is rolling. Unfortunately opkg, due to bugs and limitations, is not able to properly make use of it.

See Persistent kmods for snapshots for the original intent.

And since 2018, no one has taught the opkg utility how to prioritize kmods?

You can always be the one to bring long-awaited features, everybody would appreciate it.

So for this, I first want to know: is this a bug or a feature?

What difference does it make?

So suddenly there is some hidden meaning in this implementation that I don’t see.

That is correct, no one felt the urge to fix it since 2018. I considered it but lacked time and motivation so far.

The fact that opkg, when not finding kmods matching the currently running kernel in the main repo, does not fall back to the kmod archive is a bug.

2 Likes

None, if you need it then it just boils down whether you are willing to put in the time regardless if its a bug or just a missing feature.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.