If an image recipe has IMAGE_INSTALL += "kernel-module-foo" but the kernel was not built with foo modular, the build fails as expected. However, if at the same time some package that happens to get installed in the same image says RRECOMMENDS_${PN} += "kernel-module-foo" the build silently succeeds. With the latter line by itself, this is expected, but the build should fail when the image explicitly declares an item to install which cannot be satisfied, regardless of whether some other random package rrecommends that item. This only seems to happen with ipk, not rpm. It should be trivial to reproduce.
Re-assigning to Alex, since he is the maintainer now.
As I said on the yocto ML, could you identify the calls which OE is making to opkg, and how they change between when RRECOMMENDS is asserted and when it is not. I think its unlikely that opkg is doing something exotic with the kernel module packages, based on OE state.
See the ML; it seems that opkg is invoked with kernel-module-foo in the list of packages to install whether or not the RRECOMMENDS is in effect.
OE-Core ML thread of this discussion, which has more context and OE logs: https://lists.openembedded.org/g/openembedded-core/topic/83779506 Based on the do_rootfs log, it definitely does seem like opkg is doing something wrongly. I suspect there may be a bug with how we construct the libsolv model, in the special case that: the user is explicitly asking for a package to be installed (eg. `install ... foobar`) AND that same package is a recommends for another package being installed. Marking as high-sev, since the reproducing case implies that the affected package doesn't get installed, even though the user explicitly requests it.
Created attachment 4818 [details] Reproducing regression test More triage: Built a regression test (attached), which reproduces the issue. This issue only affects the libsolv solver. The internal solver correctly identifies and reports that the user has requested to install a nonexistent package, and returns code 255. The libsolv solver also (correctly) errors when package `a` does not *recommend* `dne`. So that further confirms that we are incorrectly building the libsolv model. Since solving this issue means changing the return codes of high-level `opkg` operations, it could break users which were depending on the old behavior; I'm targeting it to the `next-minor` rev, for that reason.
This bug should be resolved by cvadrevu's commit 5d715fc396388f3e321816a2226cdad039a0e16f [1]. [1] https://git.yoctoproject.org/opkg/commit/?id=5d715fc396388f3e321816a2226cdad039a0e16f