]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
providers.py: sort eligible providers by DEFAULT_PREFERENCE
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 8 Feb 2010 17:50:33 +0000 (18:50 +0100)
committerChris Larson <clarson@kergoth.com>
Wed, 10 Feb 2010 21:12:06 +0000 (14:12 -0700)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
lib/bb/providers.py

index f85fa6f2ce058870513cd73ff7aacb0ba8c2cac0..df7d2c6b475e86e97d7f10e2ada38a7eae18f36a 100644 (file)
@@ -224,6 +224,8 @@ def _filterProviders(providers, item, cfgData, dataCache):
             continue
         eligible.remove(fn)
         eligible = [fn] + eligible
+    # sort eligible according to their DEFAULT_PREFERENCE
+    eligible.sort(lambda a, b: dataCache.pkg_dp[b] - dataCache.pkg_dp[a])
 
     return eligible