OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version All
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Paul Spooren - 26.09.2020

FS#3363 - opkg kmod selection failure

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 here, later on like directly in the buildsystem via 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 this function simply compares package names and considers them as matching. The responded package is returned to opkg.c just then checked for 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 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.

Paul Spooren commented on 26.09.2020 04:25

The related OPKG log when using –verbosity=4

pkg_hash_fetch_best_installation_candidate: Best installation candidate for kmod-tun:
pkg_hash_fetch_best_installation_candidate: Adding kmod-tun to providers.
pkg_hash_fetch_best_installation_candidate: kmod-tun arch=x86_64 arch_priority=10 version=5.4.67.
pkg_hash_fetch_best_installation_candidate: kmod-tun arch=x86_64 arch_priority=10 version=5.4.63.
pkg_hash_fetch_best_installation_candidate: Candidate: kmod-tun 5.4.63.
pkg_hash_fetch_best_installation_candidate: Candidate: kmod-tun 5.4.67.
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=kmod-tun:
pkg_hash_fetch_best_installation_candidate: kmod-tun 5.4.63 x86_64
pkg_hash_fetch_best_installation_candidate: kmod-tun 5.4.67 x86_64
pkg_arch_supported: Arch x86_64 (priority 10) supported for pkg kmod-tun.
Installing kmod-tun (5.4.67-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-tun_5.4.67-1_x86_64.ipk
pkg_hash_fetch_best_installation_candidate: Best installation candidate for kernel:
pkg_hash_fetch_best_installation_candidate: Adding kernel to providers.
pkg_hash_fetch_best_installation_candidate: kernel arch=x86_64 arch_priority=10 version=5.4.63-1.
pkg_hash_fetch_best_installation_candidate: Using latest version of installed package kernel.
pkg_hash_fetch_unsatisfied_dependencies: satisfying_pkg=0
pkg_hash_fetch_best_installation_candidate: Best installation candidate for kernel:
pkg_hash_fetch_best_installation_candidate: Adding kernel to providers.
pkg_hash_fetch_best_installation_candidate: kernel arch=x86_64 arch_priority=10 version=5.4.63-1.
pkg_hash_fetch_best_installation_candidate: Using latest version of installed package kernel.
pkg_hash_fetch_unsatisfied_dependencies: satisfying_pkg=0
satisfy_dependencies_for: This could mean that your package list is out of date or that the packages
mentioned above do not yet exist (try 'opkg update'). To proceed in spite
of this problem try again with the '-force-depends' option.
Paul Spooren commented on 16.10.2020 20:27

A possible fix is suggest here https://github.com/openwrt/openwrt/pull/3425

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing