<?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>16083</bug_id>
          
          <creation_ts>2025-11-28 08:59:00 +0000</creation_ts>
          <short_desc>Improve error message when trying to install a non-generated package</short_desc>
          <delta_ts>2026-08-20 15:30:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>oe-core other</component>
          <version>unspecified</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>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yoann Congal">yoann.congal</reporter>
          <assigned_to name="Sundeep Kokkonda">sundeep.kokkonda</assigned_to>
          <cc>mathieu.dubois-briand</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sundeep.kokkonda</cc>
    
    <cc>swami310</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103433</commentid>
    <comment_count>0</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-28 08:59:00 +0000</bug_when>
    <thetext>When trying to install a package that is not generated (e.g. disabled by PACKAGECONFIG) the error message is:
  &lt;package&gt; is neither a recipe nor a generated package.

This could be improved with a message &quot;&lt;recipe&gt; RPROVIDES &lt;package&gt; (but &lt;package&gt; has not been generated)&quot; to help the user find where to fix this.

Code responsible is here: https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/package_manager/__init__.py?id=ac7327583aef83fd400190506f3147623de38b68#n466

This idea comes from https://irc.yoctoproject.org/irc/%23yocto.2025-11-28.log.html#yocto.2025-11-28.log.html#t2025-11-28T01:51:57

Side note: I think this can be NEWCOMER bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103521</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-12-11 15:34:54 +0000</bug_when>
    <thetext> Swaminathan . Let us know if you have any questions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103556</commentid>
    <comment_count>2</comment_count>
    <who name="Swaminathan K">swami310</who>
    <bug_when>2025-12-15 06:26:08 +0000</bug_when>
    <thetext>I will study the code and get back with my understanding of the required changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103644</commentid>
    <comment_count>3</comment_count>
    <who name="Swaminathan K">swami310</who>
    <bug_when>2025-12-23 15:51:29 +0000</bug_when>
    <thetext>I guess adding a  new line next to the existing line like this would suffice ? 

       reason = &quot;%s is neither a recipe nor a generated package.\n&quot; % pkg
       reason += (&quot;It might be declared in RPROVIDES but was not generated, &quot;
                       &quot;or the recipe is not included in this build.\n&quot;)

I tried to find out if I could some more helpful information.  I am not sure how/if I could do that . Any pointers would help</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103891</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-01-14 17:16:16 +0000</bug_when>
    <thetext>Your change would help but I think Yoann&apos;s idea was to give the user
package-specific guidance.

I suggest that you either:
1. check that the recipe name is valid and then check if there are any packages that it *could* RPROVIDE.
2. look at the code that tries to help users who made a typo and use that to learn about pattern matching:
Eg.
❯ bitbake -g coreutilslslsls
...
Loaded 2049 entries from dependency cache.
ERROR: Nothing PROVIDES &apos;coreutilslslsls&apos;. Close matches:
  coreutils

...

Also, 
You can look through the oe-core layer for examples:

❯ rg getVar.*PACKAGECONFIG  | wc -l
24

One example usage is:
❯ ../../oe-core.git/scripts/contrib/list-packageconfig-flags.py -p
... (takes a while) ...
Gathering recipe data...
RECIPE NAME                      PACKAGECONFIG FLAGS
====================================================
alsa-plugins                     aaf jack libav maemo-plugin maemo-resource-manager pulseaudio samplerate speexdsp
alsa-tools                       as10k1 echomixer envy24control hda-verb hdajackretask hdajacksensetest ...
alsa-utils                       bat manpages udev
...


To get more feedback, 
do something more than what you have so far but not so much that you spend days on the bug and then send a patch for review.

Does that help ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103955</commentid>
    <comment_count>5</comment_count>
    <who name="Swaminathan K">swami310</who>
    <bug_when>2026-01-18 09:34:03 +0000</bug_when>
    <thetext>thanks a lot for your suggestions. I will study and get back</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105723</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-06-04 15:29:37 +0000</bug_when>
    <thetext>Move back to newcomer since Swaminathan seems to have drop off.
Take back as needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106575</commentid>
    <comment_count>7</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-08-20 12:45:25 +0000</bug_when>
    <thetext>This patch got merged: https://git.openembedded.org/openembedded-core/commit/?id=46ff3a8d2c18fcba87c711bb23dbdabae20eef84

Yoann, can we close the bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106603</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-08-20 15:30:00 +0000</bug_when>
    <thetext>Paul Barker reviewed and agreed that we should close the defect as fixed.
Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>