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.
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.