<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14459</bug_id>
          
          <creation_ts>2021-06-28 13:04:19 +0000</creation_ts>
          <short_desc>RRECOMMENDS hides unsatisfiable IMAGE_INSTALL</short_desc>
          <delta_ts>2022-05-27 20:00:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.4.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>0.6.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rasmus Villemoes">rasmus.villemoes</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          <cc>alex.stewart</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90789</commentid>
    <comment_count>0</comment_count>
    <who name="Rasmus Villemoes">rasmus.villemoes</who>
    <bug_when>2021-06-28 13:04:19 +0000</bug_when>
    <thetext>If an image recipe has

IMAGE_INSTALL += &quot;kernel-module-foo&quot;

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} += &quot;kernel-module-foo&quot;

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90792</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2021-06-28 14:02:53 +0000</bug_when>
    <thetext>Re-assigning to Alex, since he is the maintainer now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90884</commentid>
    <comment_count>2</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2021-07-08 14:47:48 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91024</commentid>
    <comment_count>3</comment_count>
    <who name="Rasmus Villemoes">rasmus.villemoes</who>
    <bug_when>2021-07-27 08:22:14 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91045</commentid>
    <comment_count>4</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2021-07-28 20:46:23 +0000</bug_when>
    <thetext>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&apos;t get installed, even though the user explicitly requests it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91115</commentid>
    <comment_count>5</comment_count>
      <attachid>4818</attachid>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2021-08-05 12:28:26 +0000</bug_when>
    <thetext>Created attachment 4818
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&apos;m targeting it to the `next-minor` rev, for that reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93349</commentid>
    <comment_count>6</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2022-05-27 20:00:18 +0000</bug_when>
    <thetext>This bug should be resolved by cvadrevu&apos;s commit 5d715fc396388f3e321816a2226cdad039a0e16f [1].

[1] https://git.yoctoproject.org/opkg/commit/?id=5d715fc396388f3e321816a2226cdad039a0e16f</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4818</attachid>
            <date>2021-08-05 12:28:26 +0000</date>
            <delta_ts>2021-08-05 12:28:26 +0000</delta_ts>
            <desc>Reproducing regression test</desc>
            <filename>issue14459.py</filename>
            <type>text/x-python</type>
            <size>1029</size>
            <attacher name="Alex Stewart">alex.stewart</attacher>
            
              <data encoding="base64">IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwojIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBHUEwtMi4w
LW9ubHkKIwojIFJlcG9ydGVyOiBSYXNtdXMgVmlsbGVtb2VzIDxyYXNtdXMudmlsbGVtb2VzQHBy
ZXZhcy5kaz4KIwojIFdoYXQgc3RlcHMgd2lsbCByZXByb2R1Y2UgdGhlIHByb2JsZW0/CiMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIwojIDEuIHBrZyAnYScgcmVjb21t
ZW5kcyBwa2cgJ2RuZScKIyAyLiBwa2cgJ2RuZScgZG9l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