[bitbake-devel] Mercurial fetcher doesn't work for me (patch included)
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Tue Nov 27 19:15:36 UTC 2018
For a link to a tool to be created in $(BUILDDIR)/tmp/hosttools, the tool should be added to either ${HOSTTOOLS} (for tools that must exist) or ${HOSTTOOLS_NONFATAL} (for tools that may exist). This is typically done in bitbake.conf (for tools that everyone needs) or conf/layer.conf (if the tool is required only when using that layer). hg belongs in ${HOSTTOOLS_NONFATAL}.
//Peter
From: bitbake-devel-bounces at lists.openembedded.org <bitbake-devel-bounces at lists.openembedded.org> On Behalf Of Aaron Cohen
Sent: den 27 november 2018 19:39
To: bitbake-devel at lists.openembedded.org
Subject: [bitbake-devel] Mercurial fetcher doesn't work for me (patch included)
I'm trying to write a recipe for a local repo that is kept in mercurial, and encountering the following problem:
Traceback (most recent call last):
File "/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py", line 808, in DataSmart.getVarFlag(var='PV', flag='_content', expand=True, noweakdefault=False, parsing=False, retparser=False):
if expand or retparser:
> parser = self.expandWithRefs(value, cachename)
if expand:
File "/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py", line 416, in DataSmart.expandWithRefs(s='0.0.4+git${SRCPV}', varname='PV'):
try:
> s = __expand_var_regexp__.sub(varparse.var_sub, s)
try:
File "/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py", line 108, in VariableParse.var_sub(match=<_sre.SRE_Match object; span=(9, 17), match='${SRCPV}'>):
raise Exception("variable %s references itself!" % self.varname)
> var = self.d.getVarFlag(key, "_content")
self.references.add(key)
File "/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py", line 808, in DataSmart.getVarFlag(var='SRCPV', flag='_content', expand=True, noweakdefault=False, parsing=False, retparser=False):
if expand or retparser:
> parser = self.expandWithRefs(value, cachename)
if expand:
File "/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py", line 430, in DataSmart.expandWithRefs(s='${@bb.fetch2.get_srcrev(d)}', varname='SRCPV'):
except Exception as exc:
> raise ExpansionError(varname, s, exc) from exc
bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)}<mailto:$%7b at bb.fetch2.get_srcrev(d)%7d> which triggered exception AttributeError: 'FetchData' object has no attribute 'moddir'
I've fixed this with the following patch, which moves some code in the Hg fetcher to later in the urldata_init method, after some necessary variables have been initialized. I'm not sure if I'm alone in seeing this problem or not?
ALSO (I'm not sure if this is bitbake-related or poky-related): what is it that is supposed to create the $(BUILDDIR)/tmp/hosttools/hg symlink?
For some reason, this link is not created for me automatically. It works fine if I create it manually.
Thanks for any help,
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20181127/27e9d9cc/attachment.html>
More information about the bitbake-devel
mailing list