<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 14 March 2017 at 15:29, Patrick Ohly <span dir="ltr"><<a href="mailto:patrick.ohly@intel.com" target="_blank">patrick.ohly@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id="gmail-:15u" class="gmail-a3s gmail-aXjCH gmail-m15acd71232153b6c">When rewriting the do_rm_work injection, do_rm_work_all had been<br>
removed because it seemed obsolete, as do_build now always triggers<br>
do_rm_work.<br>
<br>
However, do_build does not get triggered for all recipes and thus<br>
do_rm_work was not called for recipes that got built only<br>
partially. For example, zlib depends indirectly on<br>
zlib-native:do_populate_<wbr>sysroot. Because of that dependency,<br>
zlib-native got compiled, but do_rm_work was never called for it.<br>
<br>
Re-introducing do_rm_work_all fixes that by making do_build depend on<br>
do_rm_work_all, which then recursively depends on do_rm_work of all<br>
dependencies. This has the unintended side-effect that do_rm_work then<br>
also triggers additional work (like do_populate_lic) that normally<br>
doesn't need to be done for a build. This seems like the lesser evil,<br>
compared to an incomplete cleanup because it mostly enables the<br>
lighter tasks after do_populate_sysroot.<br>
<br>
The real solution would be to have two kinds of relationships: a weak<br>
ordering relationship ("if A and B are enabled, A must run before B,<br>
but B can also run without A") and hard dependencies ("B cannot run<br>
unless A has run before").<br></div></blockquote></div><br>If I do a build with rm_work enabled I tend to get this error at rootfs time:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">ERROR: core-image-sato-1.0-r0 do_image_wic: Error executing a python function in exec_python_func() autogenerated:</div><div class="gmail_extra"><br></div><div class="gmail_extra">The stack trace of python calls that resulted in this exception/failure was:</div><div class="gmail_extra">File: 'exec_python_func() autogenerated', lineno: 2, function: <module></div><div class="gmail_extra"> 0001:</div><div class="gmail_extra"> *** 0002:extend_recipe_sysroot(d)</div><div class="gmail_extra"> 0003:</div><div class="gmail_extra">File: '/home/ross/Yocto/poky/meta/classes/staging.bbclass', lineno: 623, function: extend_recipe_sysroot</div><div class="gmail_extra"> 0619: dest = newmanifest[l]</div><div class="gmail_extra"> 0620: if l.endswith("/"):</div><div class="gmail_extra"> 0621: staging_copydir(l, targetdir, dest, seendirs)</div><div class="gmail_extra"> 0622: continue</div><div class="gmail_extra"> *** 0623: staging_copyfile(l, targetdir, dest, postinsts, seendirs)</div><div class="gmail_extra"> 0624:</div><div class="gmail_extra"> 0625: for f in fixme:</div><div class="gmail_extra"> 0626: if f == '':</div><div class="gmail_extra"> 0627: staging_processfixme(fixme[f], recipesysroot, recipesysroot, recipesysrootnative, d)</div><div class="gmail_extra">File: '/home/ross/Yocto/poky/meta/classes/staging.bbclass', lineno: 269, function: staging_copyfile</div><div class="gmail_extra"> 0265: os.symlink(linkto, dest)</div><div class="gmail_extra"> 0266: #bb.warn(c)</div><div class="gmail_extra"> 0267: else:</div><div class="gmail_extra"> 0268: try:</div><div class="gmail_extra"> *** 0269: os.link(c, dest)</div><div class="gmail_extra"> 0270: except OSError as err:</div><div class="gmail_extra"> 0271: if err.errno == errno.EXDEV:</div><div class="gmail_extra"> 0272: bb.utils.copyfile(c, dest)</div><div class="gmail_extra"> 0273: else:</div><div class="gmail_extra">Exception: FileExistsError: [Errno 17] File exists: '/data/poky-master/tmp/sysroots-components/corei7-64/glibc/usr/lib/crt1.o' -> '/data/poky-master/tmp/work/intel_corei7_64-poky-linux/core-image-sato/1.0-r0/recipe-sysroot/usr/lib/crt1.o'</div><div class="gmail_extra"><br></div><div class="gmail_extra">ERROR: core-image-sato-1.0-r0 do_image_wic: Function failed: extend_recipe_sysroot</div><div class="gmail_extra">ERROR: Logfile of failure stored in: /data/poky-master/tmp/work/intel_corei7_64-poky-linux/core-image-sato/1.0-r0/temp/log.do_image_wic.21552</div><div class="gmail_extra">ERROR: Task (/home/ross/Yocto/poky/meta/recipes-sato/images/core-image-sato.bb:do_image_wic) failed with exit code '1'</div><div class="gmail_extra"><br></div><div class="gmail_extra">Reverting this patch makes it go away.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ross</div></div></div>