What to do with obsolete kernel modules
Hi,
If kernel-module-foobar exists in an old rootfs, but in later version we disabled module foobar in kernel config, how can we remove the obsolete module from the old rootfs after opkg upgrade ?
Regards,
John
Quoted 3 lines · John Lee
If kernel-module-foobar exists in an old rootfs, but in later version we disabled module foobar in kernel config, how can we remove the obsolete module from the old rootfs after opkg upgrade ?
Assuming the old module has a correctly versioned dependency on its corresponding kernel version, opkg should automatically tear out the module package when the kernel is upgraded since its dependencies will no longer be met. If that isn't working, I think it would be an opkg bug.
p.
Quoted 5 lines · Phil Blundell
Quoted 3 lines · John Lee
If kernel-module-foobar exists in an old rootfs, but in later version we disabled module foobar in kernel config, how can we remove the obsolete module from the old rootfs after opkg upgrade ?
Quoted 7 lines
Assuming the old module has a correctly versioned dependency on its corresponding kernel version, opkg should automatically tear out the module package when the kernel is upgraded since its dependencies will no longer be met. If that isn't working, I think it would be an opkg bug.
p.
but that will only happen if you changed from, say, 2.6.24 to 2.6.26.
if just the git rev changed such asa1e97c611253511ffc2d8c45e3e6d6894fa03fa3 to6e2a723ef54ee2e739c34786981b2c508db803c1
then opkg wouldn't know about it.
my problem looks like this:
root@om-gta02:~# opkg status kernel-module-xt-physdev Package: kernel-module-xt-physdev Version: 2:2.6.24+git75969+a1e97c611253511ffc2d8c45e3e6d6894fa03fa3-r1.01 Depends: update-modules, kernel-2.6.24, kernel-module-x-tables Status: install ok installed Architecture: neo1973 Installed-Time: 1226894980
root@om-gta02:~# opkg status kernel-module-xt-tcpudp Package: kernel-module-xt-tcpudp Version: 3:2.6.24+gitr1+6e2a723ef54ee2e739c34786981b2c508db803c1-r2 Depends: update-modules, kernel-2.6.24, kernel-module-x-tables Status: install user installed Architecture: om-gta02
these 2 packages coexist on the same rootfs after opkg upgrade.
- John
Quoted 7 lines · John Lee
but that will only happen if you changed from, say, 2.6.24 to 2.6.26.
if just the git rev changed such as
a1e97c611253511ffc2d8c45e3e6d6894fa03fa3to6e2a723ef54ee2e739c34786981b2c508db803c1then opkg wouldn't know about it.
This is a packaging problem. If you want opkg to be able to discriminate kernel versions at this level then you need to specify the version in the Depends. Like:
Depends: update-modules, kernel-2.6.24 (= 2:2.6.24+git75969+a1e97c611253511ffc2d8c45e3e6d6894fa03fa3-r1.01), kernel-module-x-tables
Quoted 11 lines
my problem looks like this:
root@om-gta02:~# opkg status kernel-module-xt-physdev Package: kernel-module-xt-physdev Version: 2:2.6.24+git75969+a1e97c611253511ffc2d8c45e3e6d6894fa03fa3-r1.01 Depends: update-modules, kernel-2.6.24, kernel-module-x-tables Status: install ok installed Architecture: neo1973 Installed-Time: 1226894980
Quoted 6 lines
root@om-gta02:~# opkg status kernel-module-xt-tcpudp Package: kernel-module-xt-tcpudp Version: 3:2.6.24+gitr1+6e2a723ef54ee2e739c34786981b2c508db803c1-r2 Depends: update-modules, kernel-2.6.24, kernel-module-x-tables Status: install user installed Architecture: om-gta02
To be honest I am not exactly sure what you are trying to say here. I guess you want kernel-module-xt-physdev uninstalled in favour of kernel-module-xt-tcpudp, right?
If this is happening because xt-tcpudp is now providing the functionality that used to be in xt-physdev, and there is never any reason why anybody would want to install xt-physdev anymore, you should set kernel-module-xt-tcpudp to Replace: and Conflicts: with kernel-module-xt-physdev.
If this is more of a distro policy decision, and you just want to switch from xt-physdev to xt-tcpudp, you could put the Conflicts: in some appropriate task package instead (presumably the one which used to depend on kernel-module-xt-physdev and now depends on kernel-module-xt-tcpudp).
Beyond that, though, it's hard to say much without knowing more of the background to your issue. Maybe you could explain what exactly you are trying to achieve and how this situation came about.
p.
Quoted 7 lines · Phil Blundell
Quoted 6 lines · John Lee
but that will only happen if you changed from, say, 2.6.24 to 2.6.26.
if just the git rev changed such as
a1e97c611253511ffc2d8c45e3e6d6894fa03fa3to6e2a723ef54ee2e739c34786981b2c508db803c1
Quoted 7 lines
Quoted 1 line
then opkg wouldn't know about it.
This is a packaging problem. If you want opkg to be able to discriminate kernel versions at this level then you need to specify the version in the Depends. Like:
Depends: update-modules, kernel-2.6.24 (= 2:2.6.24+git75969+a1e97c611253511ffc2d8c45e3e6d6894fa03fa3-r1.01), kernel-module-x-tables
Thanks for your reply.
These dependencies actually come from kernel.bbclass, where it sets the RDEPENDS of each kernel-module-*.
It seems I need to modify kernel.bbclass to get what I want, so I asked here first.
Quoted 18 lines
Quoted 11 lines
my problem looks like this:
root@om-gta02:~# opkg status kernel-module-xt-physdev Package: kernel-module-xt-physdev Version: 2:2.6.24+git75969+a1e97c611253511ffc2d8c45e3e6d6894fa03fa3-r1.01 Depends: update-modules, kernel-2.6.24, kernel-module-x-tables Status: install ok installed Architecture: neo1973 Installed-Time: 1226894980Quoted 6 lines
root@om-gta02:~# opkg status kernel-module-xt-tcpudp Package: kernel-module-xt-tcpudp Version: 3:2.6.24+gitr1+6e2a723ef54ee2e739c34786981b2c508db803c1-r2 Depends: update-modules, kernel-2.6.24, kernel-module-x-tables Status: install user installed Architecture: om-gta02
Quoted 3 lines
To be honest I am not exactly sure what you are trying to say here. I guess you want kernel-module-xt-physdev uninstalled in favour of kernel-module-xt-tcpudp, right?
I use these 2 packages as example because this situation actually should not happen. I installed a new set of kernel (3:xxx) but some of the old modules are still there. (2:xxx) These two packages are unrelated to each other so one cannot relace the other.
- John