[poky] Fetcher2 problems break parsing

Koen Kooi koen at dominion.thruhere.net
Tue Feb 1 06:34:34 PST 2011


Op 1 feb 2011, om 14:07 heeft Koen Kooi het volgende geschreven:

> Hi,
> 
> Since a few days I'm getting this on recipes using SRCPV:
> 
> Executing: MACHINE=beagleboard bitbake -b /OE/tentacle/sources/openembedded/meta/recipes-graphics/xorg-lib/libxext_git.bb -c fetch
> Pseudo is not present but is required, building this first before the main build
> Loading cache: 100% |##############################################################################################################################| ETA:  00:00:00
> Loaded 448 entries from dependency cache.
> NOTE: Angstrom DOES NOT support util-linux because only util-linux-ng is supported                                                                 | ETA:  --:--:--
> NOTE: Angstrom DOES NOT support gconf-dbus because gconf-dbus has been merged back into main GConf
> NOTE: Angstrom DOES NOT support gconf-dbus-native because gconf-dbus has been merged back into main GConf
> ERROR: Error evaluating '${@bb.fetch.get_srcrev(d)}'
> Traceback (most recent call last):
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in expandWithRefs
>    s = __expand_python_regexp__.sub(varparse.python_sub, s)
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in python_sub
>    value = utils.better_eval(codeobj, DataContext(self.d))
>  File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in better_eval
>    return eval(source, _context, locals)
>  File "SRCPV", line 1, in <module>
>  File "/OE/tentacle/sources/bitbake/lib/bb/fetch2/__init__.py", line 398, in get_srcrev
>    return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
>  File "/OE/tentacle/sources/bitbake/lib/bb/fetch2/__init__.py", line 870, in sortable_revision
>    return str(count + "+" + latest_rev)
> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
> 
> ERROR: Error evaluating '1.0.99.1+gitr${SRCPV}'
> Traceback (most recent call last):
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 116, in expandWithRefs
>    s = __expand_var_regexp__.sub(varparse.var_sub, s)
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 60, in var_sub
>    var = self.d.getVar(key, 1)
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 260, in getVar
>    return self.expand(value, var)
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 132, in expand
>    return self.expandWithRefs(s, varname).value
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in expandWithRefs
>    s = __expand_python_regexp__.sub(varparse.python_sub, s)
>  File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in python_sub
>    value = utils.better_eval(codeobj, DataContext(self.d))
>  File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in better_eval
>    return eval(source, _context, locals)
>  File "SRCPV", line 1, in <module>
>  File "/OE/tentacle/sources/bitbake/lib/bb/fetch2/__init__.py", line 398, in get_srcrev
>    return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
>  File "/OE/tentacle/sources/bitbake/lib/bb/fetch2/__init__.py", line 870, in sortable_revision
>    return str(count + "+" + latest_rev)
> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
> 
> This seems to happen when no SRCREV is set, is that the intended behaviour?

RP gave me this patch to try:

koen at dominion:/OE/tentacle/sources/openembedded$ git diff
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 9fe4eb2..d62ba81 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -864,7 +864,7 @@ class Fetch(object):
         if uselocalcount:
             count = Fetch.localcount_internal_helper(ud, d)
         if count is None:
-            count = localcounts[key + '_count']
+            count = localcounts[key + '_count'] or "0"
 
         if last_rev == latest_rev:
             return str(count + "+" + latest_rev)


and that seems to work.

regards,

Koen


More information about the poky mailing list