<div dir="ltr">You asked for bblayers.conf and local.conf on IRC, here it is:<div><br></div><div>bblayers.conf:</div><div><div>LCONF_VERSION = &quot;7&quot;</div><div>TMPDIR := &quot;/OE/build/oe-core&quot;</div><div>BBPATH = &quot;${TOPDIR}:${TMPDIR}&quot;</div><div>BBLAYERS = &quot;${TOPDIR}/openembedded-core/meta&quot;</div></div><div><br></div><div>local.conf:</div><div>empty</div><div><br></div><div>and in environment:</div><div><div>BB_ENV_EXTRAWHITE=MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD</div></div><div>MACHINE=qemux86<br></div><div>DISTRO is empty</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 18, 2017 at 1:16 AM, Martin Jansa <span dir="ltr">&lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Feb 15, 2017 at 10:58:49AM +0200, Ed Bartosh wrote:<br>
&gt; Hi Martin,<br>
&gt;<br>
&gt; Sorry for the delay. I missedd your message somehow.<br>
&gt;<br>
&gt; I can&#39;t reproduce this. Tried with latest poky and latest oe-core +<br>
&gt; bitbake. I built core-image-tiny-initramfs from scratch and bitbake -e<br>
&gt; busybox works for me just fine.<br>
&gt;<br>
&gt; Can you provide more details about your setup, please?<br>
<br>
Hi Ed,<br>
<br>
I was also having troubles reproducing it in different setup as well, until I&#39;ve<br>
found out that my local.conf had this line:<br>
<br>
IMAGE_FSTYPES_qemux86 = &quot;vmdk&quot;<br>
<br>
which prevented ever using wic (USING_WIC variable was always empty).<br>
<br>
Now with this line removed I can share the complete exception reproduced<br>
with just oe-core layer included:<br>
<br>
$ bitbake -e core-image-tiny-initramfs | tee env.core-image-tiny-initramfs5<br>
NOTE: Started PRServer with DBfile: /OE/build/oe-core/cache/<wbr>prserv.sqlite3, IP: 127.0.0.1, PORT: 38869, PID: 21506<br>
Parsing recipes...ERROR: ExpansionError during parsing /OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>recipes-core/images/<a href="http://core-image-tiny-initramfs.bb" rel="noreferrer" target="_blank">core-<wbr>image-tiny-initramfs.bb</a><br>
Traceback (most recent call last):<br>
  File &quot;/OE/build/oe-core/bitbake/<wbr>lib/bb/data_smart.py&quot;, line 412, in DataSmart.expandWithRefs(s=&#39;\<wbr>tout=&quot;${IMGDEPLOYDIR}/${IMAGE_<wbr>NAME}&quot;\n\twks=&quot;${WKS_FULL_<wbr>PATH}&quot;\n\tif [ -z &quot;$wks&quot; ]; then\n\t\tbbfatal &quot;No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately.&quot;\n\tfi\n\n\<wbr>tBUILDDIR=&quot;${TOPDIR}&quot; wic create &quot;$wks&quot; --vars &quot;${STAGING_DIR}/${MACHINE}/<wbr>imgdata/&quot; -e &quot;${IMAGE_BASENAME}&quot; -o &quot;$out/&quot; ${WIC_CREATE_EXTRA_ARGS}\n\tmv &quot;$out/$(basename &quot;${wks%.wks}&quot;)&quot;*.direct &quot;$out${IMAGE_NAME_SUFFIX}.wic&quot;<wbr>\n\trm -rf &quot;$out/&quot;\n&#39;, varname=&#39;IMAGE_CMD&#39;):<br>
                 try:<br>
    &gt;                s = __expand_var_regexp__.sub(<wbr>varparse.var_sub, s)<br>
                     try:<br>
  File &quot;/OE/build/oe-core/bitbake/<wbr>lib/bb/data_smart.py&quot;, line 111, in VariableParse.var_sub(match=&lt;_<wbr>sre.SRE_Match object; span=(43, 59), match=&#39;${WKS_FULL_PATH}&#39;&gt;):<br>
                 else:<br>
    &gt;                var = self.d.getVarFlag(key, &quot;_content&quot;)<br>
                 self.references.add(key)<br>
  File &quot;/OE/build/oe-core/bitbake/<wbr>lib/bb/data_smart.py&quot;, line 773, in DataSmart.getVarFlag(var=&#39;WKS_<wbr>FULL_PATH&#39;, flag=&#39;_content&#39;, expand=True, noweakdefault=False, parsing=False):<br>
                     cachename = var + &quot;[&quot; + flag + &quot;]&quot;<br>
    &gt;            value = self.expand(value, cachename)<br>
<br>
  File &quot;/OE/build/oe-core/bitbake/<wbr>lib/bb/data_smart.py&quot;, line 436, in DataSmart.expand(s=&quot;${@wks_<wbr>search(&#39;${WKS_FILES}&#39;.split(), &#39;${WKS_SEARCH_PATH}&#39;) or &#39;&#39;}&quot;, varname=&#39;WKS_FULL_PATH&#39;):<br>
         def expand(self, s, varname = None):<br>
    &gt;        return self.expandWithRefs(s, varname).value<br>
<br>
  File &quot;/OE/build/oe-core/bitbake/<wbr>lib/bb/data_smart.py&quot;, line 426, in DataSmart.expandWithRefs(s=&quot;${<wbr>@wks_search(&#39;directdisk.wks core-image-tiny-initramfs.wks&#39;<wbr>.split(), &#39;/OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>recipes-core/images:${@&#39;:&#39;.<wbr>join(&#39;%s/wic&#39; % p for p in &#39;/OE/build/oe-core:${TMPDIR}:/<wbr>OE/build/oe-core/openembedded-<wbr>core/meta&#39;.split(&#39;:&#39;))}:${@&#39;:&#39;<wbr>.join(&#39;%s/scripts/lib/wic/<wbr>canned-wks&#39; % l for l in &#39;/OE/build/oe-core:${TMPDIR}:/<wbr>OE/build/oe-core/openembedded-<wbr>core/meta:/OE/build/oe-core/<wbr>openembedded-core&#39;.split(&#39;:&#39;))<wbr>}&#39;) or &#39;&#39;}&quot;, varname=&#39;WKS_FULL_PATH&#39;):<br>
                 except Exception as exc:<br>
    &gt;                raise ExpansionError(varname, s, exc) from exc<br>
<br>
bb.data_smart.ExpansionError: Failure expanding variable WKS_FULL_PATH, expression was ${@wks_search(&#39;directdisk.wks core-image-tiny-initramfs.wks&#39;<wbr>.split(), &#39;/OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>recipes-core/images:${@&#39;:&#39;.<wbr>join(&#39;%s/wic&#39; % p for p in &#39;/OE/build/oe-core:${TMPDIR}:/<wbr>OE/build/oe-core/openembedded-<wbr>core/meta&#39;.split(&#39;:&#39;))}:${@&#39;:&#39;<wbr>.join(&#39;%s/scripts/lib/wic/<wbr>canned-wks&#39; % l for l in &#39;/OE/build/oe-core:${TMPDIR}:/<wbr>OE/build/oe-core/openembedded-<wbr>core/meta:/OE/build/oe-core/<wbr>openembedded-core&#39;.split(&#39;:&#39;))<wbr>}&#39;) or &#39;&#39;} which triggered exception SyntaxError: invalid syntax (WKS_FULL_PATH, line 1)<br>
<br>
<br>
Summary: There was 1 ERROR message shown, returning a non-zero exit code.<br>
<br>
The strange part of this exception is the unexpanded ${TMPDIR} in the WKS_SEARCH_PATH value,<br>
that lead me to following 2 lines in conf/bblayers.conf:<br>
<br>
TMPDIR := &quot;/OE/build/oe-core&quot;<br>
BBPATH = &quot;${TOPDIR}:${TMPDIR}&quot;<br>
<br>
I&#39;m not sure why it appears unexpanded in WKS_SEARCH_PATH, I see you do some magick with all these<br>
WKS_* variables, especially in that anonymous python, but the exception is actually from<br>
expanding IMAGE_CMD_wic () function and it goes away if I remove following line from it:<br>
<br>
        wks=&quot;${WKS_FULL_PATH}&quot;<br>
<br>
And it also goes away if I use immediate expansion when setting that BBPATH in bblayers.conf.<br>
<br>
Interesting variables from bitbake -e with immediate expansion:<br>
# $BBPATH [4 operations]<br>
#   immediate /OE/build/oe-core/conf/<wbr>bblayers.conf:6<br>
#     &quot;${TOPDIR}:${TMPDIR}&quot;<br>
#   postdot /OE/build/oe-core/<wbr>openembedded-core/meta/conf/<wbr>layer.conf:2<br>
#     &quot;:${LAYERDIR}&quot;<br>
#   set data_smart.py:911 [expandVarref]<br>
#     &quot;/OE/build/oe-core:/OE/build/<wbr>oe-core:/OE/build/oe-core/<wbr>openembedded-core/meta&quot;<br>
#   set /OE/build/oe-core/<wbr>openembedded-core/meta/conf/<wbr>documentation.conf:94<br>
#     [doc] &quot;Used by BitBake to locate .bbclass and configuration files. This variable is analogous to the PATH variable.&quot;<br>
# pre-expansion value:<br>
#   &quot;/OE/build/oe-core:/OE/build/<wbr>oe-core:/OE/build/oe-core/<wbr>openembedded-core/meta&quot;<br>
BBPATH=&quot;/OE/build/oe-core:/OE/<wbr>build/oe-core:/OE/build/oe-<wbr>core/openembedded-core/meta&quot;<br>
<br>
# $WKS_SEARCH_PATH<br>
#   set? /OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>classes/image_types_wic.<wbr>bbclass:10<br>
#     &quot;${THISDIR}:${@&#39;:&#39;.join(&#39;%s/<wbr>wic&#39; % p for p in &#39;${BBPATH}&#39;.split(&#39;:&#39;))}:${@&#39;:<wbr>&#39;.join(&#39;%s/scripts/lib/wic/<wbr>canned-wks&#39; % l for l in &#39;${BBPATH}:${COREBASE}&#39;.split(<wbr>&#39;:&#39;))}&quot;<br>
WKS_SEARCH_PATH=&quot;/OE/build/oe-<wbr>core/openembedded-core/meta/<wbr>recipes-core/images:/OE/build/<wbr>oe-core/wic:/OE/build/oe-core/<wbr>wic:/OE/build/oe-core/<wbr>openembedded-core/meta/wic:/<wbr>OE/build/oe-core/scripts/lib/<wbr>wic/canned-wks:/OE/build/oe-<wbr>core/scripts/lib/wic/canned-<wbr>wks:/OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>scripts/lib/wic/canned-wks:/<wbr>OE/build/oe-core/openembedded-<wbr>core/scripts/lib/wic/canned-<wbr>wks&quot;<br>
<br>
# $WKS_FULL_PATH<br>
#   set /OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>classes/image_types_wic.<wbr>bbclass:11<br>
#     &quot;${@wks_search(&#39;${WKS_FILES}&#39;.<wbr>split(), &#39;${WKS_SEARCH_PATH}&#39;) or &#39;&#39;}&quot;<br>
WKS_FULL_PATH=&quot;/OE/build/oe-<wbr>core/openembedded-core/<wbr>scripts/lib/wic/canned-wks/<wbr>directdisk.wks&quot;<br>
<br>
And the same without immediate expansion, but with &#39;wks=&quot;${WKS_FULL_PATH}&quot;&#39; line removed so that it doesn&#39;t fail to parse:<br>
# $BBPATH [4 operations]<br>
#   set /OE/build/oe-core/conf/<wbr>bblayers.conf:6<br>
#     &quot;${TOPDIR}:${TMPDIR}&quot;<br>
#   postdot /OE/build/oe-core/<wbr>openembedded-core/meta/conf/<wbr>layer.conf:2<br>
#     &quot;:${LAYERDIR}&quot;<br>
#   set data_smart.py:911 [expandVarref]<br>
#     &quot;${TOPDIR}:${TMPDIR}:/OE/<wbr>build/oe-core/openembedded-<wbr>core/meta&quot;<br>
#   set /OE/build/oe-core/<wbr>openembedded-core/meta/conf/<wbr>documentation.conf:94<br>
#     [doc] &quot;Used by BitBake to locate .bbclass and configuration files. This variable is analogous to the PATH variable.&quot;<br>
# pre-expansion value:<br>
#   &quot;${TOPDIR}:${TMPDIR}:/OE/<wbr>build/oe-core/openembedded-<wbr>core/meta&quot;<br>
BBPATH=&quot;/OE/build/oe-core:/OE/<wbr>build/oe-core-glibc:/OE/build/<wbr>oe-core/openembedded-core/<wbr>meta&quot;<br>
<br>
# $WKS_SEARCH_PATH<br>
#   set? /OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>classes/image_types_wic.<wbr>bbclass:10<br>
#     &quot;${THISDIR}:${@&#39;:&#39;.join(&#39;%s/<wbr>wic&#39; % p for p in &#39;${BBPATH}&#39;.split(&#39;:&#39;))}:${@&#39;:<wbr>&#39;.join(&#39;%s/scripts/lib/wic/<wbr>canned-wks&#39; % l for l in &#39;${BBPATH}:${COREBASE}&#39;.split(<wbr>&#39;:&#39;))}&quot;<br>
WKS_SEARCH_PATH=&quot;/OE/build/oe-<wbr>core/openembedded-core/meta/<wbr>recipes-core/images:/OE/build/<wbr>oe-core/wic:/OE/build/oe-core-<wbr>glibc/wic:/OE/build/oe-core/<wbr>openembedded-core/meta/wic:/<wbr>OE/build/oe-core/scripts/lib/<wbr>wic/canned-wks:/OE/build/oe-<wbr>core-glibc/scripts/lib/wic/<wbr>canned-wks:/OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>scripts/lib/wic/canned-wks:/<wbr>OE/build/oe-core/openembedded-<wbr>core/scripts/lib/wic/canned-<wbr>wks&quot;<br>
<br>
# $WKS_FULL_PATH<br>
#   set /OE/build/oe-core/<wbr>openembedded-core/meta/<wbr>classes/image_types_wic.<wbr>bbclass:11<br>
#     &quot;${@wks_search(&#39;${WKS_FILES}&#39;.<wbr>split(), &#39;${WKS_SEARCH_PATH}&#39;) or &#39;&#39;}&quot;<br>
WKS_FULL_PATH=&quot;/OE/build/oe-<wbr>core/openembedded-core/<wbr>scripts/lib/wic/canned-wks/<wbr>directdisk.wks&quot;<br>
<br>
Let me know if sharing &quot;bitbake -e core-image-tiny-initramfs&quot; from these 2 tests would be useful for you.<br>
<br>
Regards,<br>
&gt;<br>
&gt; On Thu, Feb 09, 2017 at 09:39:30AM +0100, Martin Jansa wrote:<br>
&gt; &gt; Running e.g. bitbake -e busybox with latest oe-core triggers this badly<br>
&gt; &gt; looking exception:<br>
&gt; &gt;<br>
&gt; &gt; Can we add some weak assignment for people who don&#39;t care about wic<br>
&gt; &gt; or core-image-tiny-initramfs to continue using oe-core?<br>
&gt; &gt;<br>
&gt; &gt; ERROR: ExpansionError during parsing /OE/oe-core/meta/recipes-core/<wbr>images/<br>
&gt; &gt; <a href="http://core-image-tiny-initramfs.bb" rel="noreferrer" target="_blank">core-image-tiny-initramfs.bb</a><br>
&gt; &gt; Traceback (most recent call last):<br>
&gt; &gt;   File &quot;/OE/bitbake/lib/bb/data_<wbr>smart.py&quot;, line 412, in<br>
&gt; &gt; DataSmart.expandWithRefs(s=&#39;\<wbr>tout=&quot;${IMGDEPLOYDIR}/${IMAGE_<wbr>NAME}&quot;\n\twks=&quot;${WKS_FULL_<wbr>PATH}&quot;\n\tif<br>
&gt; &gt; [ -z &quot;$wks&quot; ]; then\n\t\tbbfatal &quot;No kickstart files from WKS_FILES were<br>
&gt; &gt; found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES<br>
&gt; &gt; appropriately.&quot;\n\tfi\n\n\<wbr>tBUILDDIR=&quot;${TOPDIR}&quot; wic create &quot;$wks&quot; --vars<br>
&gt; &gt; &quot;${STAGING_DIR}/${MACHINE}/<wbr>imgdata/&quot; -e &quot;${IMAGE_BASENAME}&quot; -o &quot;$out/&quot;<br>
&gt; &gt; ${WIC_CREATE_EXTRA_ARGS}\n\tmv &quot;$out/$(basename &quot;${wks%.wks}&quot;)&quot;*.direct<br>
&gt; &gt; &quot;$out${IMAGE_NAME_SUFFIX}.wic&quot;<wbr>\n\trm -rf &quot;$out/&quot;\n&#39;, varname=&#39;IMAGE_CMD&#39;):<br>
&gt; &gt;                  try:<br>
&gt; &gt;     &gt;                s = __expand_var_regexp__.sub(<wbr>varparse.var_sub, s)<br>
&gt; &gt;                      try:<br>
&gt; &gt;   File &quot;/OE/bitbake/lib/bb/data_<wbr>smart.py&quot;, line 111, in<br>
&gt; &gt; VariableParse.var_sub(match=&lt;_<wbr>sre.SRE_Match object; span=(43, 59),<br>
&gt; &gt; match=&#39;${WKS_FULL_PATH}&#39;&gt;):<br>
&gt; &gt;                  else:<br>
&gt; &gt;     &gt;                var = self.d.getVarFlag(key, &quot;_content&quot;)<br>
&gt; &gt;                  self.references.add(key)<br>
&gt; &gt;   File &quot;/OE/bitbake/lib/bb/data_<wbr>smart.py&quot;, line 773, in<br>
&gt; &gt; DataSmart.getVarFlag(var=&#39;WKS_<wbr>FULL_PATH&#39;, flag=&#39;_content&#39;, expand=True,<br>
&gt; &gt; noweakdefault=False, parsing=False):<br>
&gt; &gt;                      cachename = var + &quot;[&quot; + flag + &quot;]&quot;<br>
&gt; &gt;     &gt;            value = self.expand(value, cachename)<br>
&gt; &gt;<br>
&gt; &gt;   File &quot;/OE/bitbake/lib/bb/data_<wbr>smart.py&quot;, line 436, in<br>
&gt; &gt; DataSmart.expand(s=&quot;${@wks_<wbr>search(&#39;${WKS_FILES}&#39;.split(),<br>
&gt; &gt; &#39;${WKS_SEARCH_PATH}&#39;) or &#39;&#39;}&quot;, varname=&#39;WKS_FULL_PATH&#39;):<br>
&gt; &gt;          def expand(self, s, varname = None):<br>
&gt; &gt;     &gt;        return self.expandWithRefs(s, varname).value<br>
&gt; &gt;<br>
&gt; &gt;   File &quot;/OE/bitbake/lib/bb/data_<wbr>smart.py&quot;, line 426, in<br>
&gt; &gt; DataSmart.expandWithRefs(s=&quot;${<wbr>@wks_search(&#39;directdisk.wks<br>
&gt; &gt; core-image-tiny-initramfs.wks&#39;<wbr>.split(),<br>
&gt; &gt; &#39;/OE/oe-core/meta/recipes-<wbr>core/images:${@&#39;:&#39;.join(&#39;%s/<wbr>wic&#39; % p for p in<br>
&gt; &gt; &#39;/OE:${TMPDIR}:/OE/oe-core/<wbr>meta&#39;.split(&#39;:&#39;))}:${@&#39;:&#39;.<wbr>join(&#39;%s/scripts/lib/wic/<wbr>canned-wks&#39;<br>
&gt; &gt; % l for l in &#39;/OE:${TMPDIR}:/OE/oe-core/<wbr>meta:/OE/oe-core&#39;.split(&#39;:&#39;))}<wbr>&#39;) or<br>
&gt; &gt; &#39;&#39;}&quot;, varname=&#39;WKS_FULL_PATH&#39;):<br>
&gt; &gt;                  except Exception as exc:<br>
&gt; &gt;     &gt;                raise ExpansionError(varname, s, exc) from exc<br>
&gt; &gt;<br>
&gt; &gt; bb.data_smart.ExpansionError: Failure expanding variable WKS_FULL_PATH,<br>
&gt; &gt; expression was ${@wks_search(&#39;directdisk.wks<br>
&gt; &gt; core-image-tiny-initramfs.wks&#39;<wbr>.split(),<br>
&gt; &gt; &#39;/OE/oe-core/meta/recipes-<wbr>core/images:${@&#39;:&#39;.join(&#39;%s/<wbr>wic&#39; % p for p in<br>
&gt; &gt; &#39;/OE:${TMPDIR}:/OE/oe-core/<wbr>meta&#39;.split(&#39;:&#39;))}:${@&#39;:&#39;.<wbr>join(&#39;%s/scripts/lib/wic/<wbr>canned-wks&#39;<br>
&gt; &gt; % l for l in &#39;/OE:${TMPDIR}:/OE/oe-core/<wbr>meta:/OE/oe-core&#39;.split(&#39;:&#39;))}<wbr>&#39;) or<br>
&gt; &gt; &#39;&#39;} which triggered exception SyntaxError: invalid syntax (WKS_FULL_PATH,<br>
&gt; &gt; line 1)<br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt; Regards,<br>
&gt; Ed<br>
<br>
--<br>
Martin &#39;JaMa&#39; Jansa     jabber: <a href="mailto:Martin.Jansa@gmail.com">Martin.Jansa@gmail.com</a><br>
</font></span></blockquote></div><br></div>