<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#943634;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US">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}.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US">//Peter<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#943634;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> bitbake-devel-bounces@lists.openembedded.org <bitbake-devel-bounces@lists.openembedded.org>
<b>On Behalf Of </b>Aaron Cohen<br>
<b>Sent:</b> den 27 november 2018 19:39<br>
<b>To:</b> bitbake-devel@lists.openembedded.org<br>
<b>Subject:</b> [bitbake-devel] Mercurial fetcher doesn't work for me (patch included)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal">I'm trying to write a recipe for a local repo that is kept in mercurial, and encountering the following problem:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Traceback (most recent call last):<br>
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):<br>
if expand or retparser:<br>
> parser = self.expandWithRefs(value, cachename)<br>
if expand:<br>
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'):<br>
try:<br>
> s = __expand_var_regexp__.sub(varparse.var_sub, s)<br>
try:<br>
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}'>):<br>
raise Exception("variable %s references itself!" % self.varname)<br>
> var = self.d.getVarFlag(key, "_content")<br>
self.references.add(key)<br>
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):<br>
if expand or retparser:<br>
> parser = self.expandWithRefs(value, cachename)<br>
if expand:<br>
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'):<br>
except Exception as exc:<br>
> raise ExpansionError(varname, s, exc) from exc<br>
<br>
bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was <a href="mailto:$%7b@bb.fetch2.get_srcrev(d)%7d">
${@bb.fetch2.get_srcrev(d)}</a> which triggered exception AttributeError: 'FetchData' object has no attribute 'moddir'<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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? <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For some reason, this link is not created for me automatically. It works fine if I create it manually.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for any help,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Aaron<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>