[oe-commits] [bitbake] branch master-next updated: providers: Fix PREFERRED_VERSION lookup for '_' in PN

git at git.openembedded.org git at git.openembedded.org
Thu Feb 25 09:43:38 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
       new  1c55088   providers: Fix PREFERRED_VERSION lookup for '_' in PN
1c55088 is described below

commit 1c55088e0d3df5ef1481f4f2d76e29978d4b79f0
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Feb 25 09:41:12 2016 +0000

    providers: Fix PREFERRED_VERSION lookup for '_' in PN
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/providers.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index 68c8d59..ffa532c 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -121,11 +121,14 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
     preferred_file = None
     preferred_ver = None
 
-    localdata = data.createCopy(cfgData)
-    localdata.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn))
-    bb.data.update_data(localdata)
+    # pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot
+    # hence we do this manually rather than use OVERRIDES
+    preferred_v = cfgData.getVar("PREFERRED_VERSION_pn-%s" % pn, True)
+    if not preferred_v:
+        preferred_v = cfgData.getVar("PREFERRED_VERSION_%s" % pn, True)
+    if not preferred_v:
+        preferred_v = cfgData.getVar("PREFERRED_VERSION", True)
 
-    preferred_v = localdata.getVar('PREFERRED_VERSION', True)
     if preferred_v:
         m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
         if m:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list