[FS#3363] opkg kmod selection failure

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Fri Sep 25 22:59:04 EDT 2020


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Paul Spooren (aparcar0) 

Attached to Project - OpenWrt/LEDE Project
Summary - opkg kmod selection failure
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Medium
Priority - Very Low
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - The snapshot builds frequently change Kernel versions which breaks compatibility with kmods from /target/subtarget/packages. For this reason the /target/subtarget/kmods archive was introduced, allowing running machines to select not only the latest, but also a compatible kmod.

Currently the builbot adds the kmod archive [[https://git.openwrt.org/?p=buildbot.git;a=blob;f=phase1/master.cfg;h=792f9b3a55a2d8ebae1917c56716cc0d699f9172;hb=HEAD#l903|here]], later on like directly in the buildsystem via [[https://github.com/openwrt/openwrt/pull/3425|this commit]].

The PR above brought up the issue that OPKG selects wrong Kernel versions, even if the kmod feeds contains a compatible version. Looking at the OPKG code it seems that [[https://git.openwrt.org/?p=project/opkg-lede.git;a=blob;f=libopkg/pkg_hash.c;h=52c64ff137ba49f38d7bc31d0601f3037ad8a10d;hb=HEAD#l410|this function]] simply compares package names and considers them as matching. The responded package is [[https://git.openwrt.org/?p=project/opkg-lede.git;a=blob;f=libopkg/opkg.c;h=3583488780221b6fc566aa3b39ce378950a0503b;hb=HEAD#l225|returned to opkg.c]] just then checked for [[https://git.openwrt.org/?p=project/opkg-lede.git;a=blob;f=libopkg/opkg.c;h=3583488780221b6fc566aa3b39ce378950a0503b;hb=HEAD#l241|unsatisfied_dependencies]]. As the function only receives a single package it can't evaluate any alternatives.

A possible solution *could* be to kick out problematic packages (aka unfitting kmods) earlier, e.g. by not adding them to the list of matching packages after all. This happens [[https://git.openwrt.org/?p=project/opkg-lede.git;a=blob;f=libopkg/pkg_hash.c;h=52c64ff137ba49f38d7bc31d0601f3037ad8a10d;hb=HEAD#l366|here]]. We could run pkg_hash_fetch_unsatisfied_dependencies on each match skip adding it to matching_pkgs.

I tried for a while to implement that, but failed. By adding the extra check it effectively skipped dependency checks allowing to install completely incompatible packages. I'd therefore be very happy if someone with more C experience could look into that.

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3363

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list