Bug 15967 - PREFERRED_VERSION does not necessarily select highest matching version.
Summary: PREFERRED_VERSION does not necessarily select highest matching version.
Status: NEW
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium minor
Target Milestone: 5.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-09-09 09:22 UTC by Josef Holzmayr
Modified: 2025-09-15 17:35 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Holzmayr 2025-09-09 09:22:51 UTC
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 = "4.%" 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.
Comment 1 Randy MacLeod 2025-09-11 14:46:50 UTC
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.