<?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>15967</bug_id>
          
          <creation_ts>2025-09-09 09:22:51 +0000</creation_ts>
          <short_desc>PREFERRED_VERSION does not necessarily select highest matching version.</short_desc>
          <delta_ts>2025-09-15 17:35:39 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Josef Holzmayr">jester</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</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>102720</commentid>
    <comment_count>0</comment_count>
    <who name="Josef Holzmayr">jester</who>
    <bug_when>2025-09-09 09:22:51 +0000</bug_when>
    <thetext>Steps to reproduce:

Create three recipes with PV 4.0, 4.0.1, 4.1, like
- example_4.0.bb
- example_4.0.1.bb
- example_4.1.bb

Set PREFERRED_VERSION_example = &quot;4.%&quot; in local.conf

bitbake-getvar -r example PV yields 4.0.1.

The naive assumption is that if more than one version matches the wildcard, then the highest one is picked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102739</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-09-11 14:46:50 +0000</bug_when>
    <thetext>An oversight that can be reduced with a more specific glob pattern or a specific version.
Solving the problem in general may require being psychic.

- YP Bug review team.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>