[bitbake-devel] providers.py: Fix PREFERRED_VERSION containing epochs

Submitted by Richard Purdie on Oct. 3, 2012, 12:29 p.m.


Message ID 1349267399.18301.30.camel@ted
State New
Headers show

Commit Message

Richard Purdie Oct. 3, 2012, 12:29 p.m.
For some reason the code calls int() on the epoch component of any
PREFERRED_VERSION. Since this is compared against strings, the comparison
would always fail. This removes the stray cast and allows epochs
in preferred_version to work correctly.

[YOCTO #3187]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index 24cb217..fcee6dc 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -130,7 +130,7 @@  def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
         m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
         if m:
             if m.group(1):
-                preferred_e = int(m.group(1)[:-1])
+                preferred_e = m.group(1)[:-1]
                 preferred_e = None
             preferred_v = m.group(2)