[bitbake-devel] PREFERRED_VERSION with % wildcard picking unexpected version

Andre McCurdy armccurdy at gmail.com
Tue Dec 1 05:13:04 UTC 2015


I have two recipes within a single layer:

  stblinux_3.14-1.7.bb
  stblinux_3.14-1.8.bb

If PREFERRED_VERSION_stblinux is set to "3.14%", then I would expect
the version 3.14-1.8 recipe to be selected, however 3.14-1.7 gets
selected instead.

Reversing the order of files stored in pkg_pn[pn] seems to help. Is it
a reasonable solution?


diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index 637e1fa..b7b1e46 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -234,6 +234,10 @@ def _filterProviders(providers, item, cfgData, dataCache):
     # than effectively random.
     providers.sort()

+    # Reverse the list to help ensure that multiple recipes with the same
+    # priority and preference are considered "highest version number first".
+    providers.reverse()
+
     # Collate providers by PN
     pkg_pn = {}
     for p in providers:



More information about the bitbake-devel mailing list