<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 4, 2016, at 10:07 PM, Josias Inacio da Silva Filho <<a href="mailto:josiasinacio@hotmail.com" class="">josiasinacio@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div style="font-family: Arial; font-size: 10pt;" class="">
<div style="font-style: normal; display: inline; font-family: Calibri; font-size: small; font-weight: normal; text-decoration: none;" class="">
<div dir="ltr" class="">
<div style="font-family: Arial; font-size: 10pt;" class="">
<div class="">Hi guys,</div>
<div class=""> </div>
<div class="">I’m trying to run a recipe that has dependencies in the generation of the
roofts and kernel image files. Without those two files already in the deploy
folder, I cannot start running my recipe.</div>
<div class=""> </div>
<div class="">Some suggested that I should add the task in a class and make that
dependent of do_rootfs. Then, inherit that class in a recipe. But I haven’t been
successful with that. Here’s what I have:</div>
<div class=""> </div>
<div class=""><strong class=""><u class="">myclass.bbclass:</u></strong></div>
<div class=""> </div>
<div class="">do_work() {</div>
<div class=""> #main work done here</div>
<div class="">}</div>
<div class="">addtask work after do_rootfs</div>
<div class=""> </div>
<div class="">##### end of class </div>
<div class=""> </div>
<div class=""><strong class=""><u class="">myrecipe.bb:</u></strong></div>
<div class=""> </div>
<div class="">inherit myclass</div>
<div class=""> </div>
<div class="">do_deploy() {</div>
<div class=""> do_work</div>
<div class="">}</div>
<div class="">addtask do_deploy</div>
<div class=""> </div>
<div class="">##### end of recipe</div>
<div class=""> </div>
<div class=""> </div>
<div class="">This must be very wrong, as the do_deploy task of my recipe is being
executed before do_rootfs happens, so it fails because do_work needs files that
haven’t been created in the deploy folder yet.</div>
<div class=""> </div>
<div class="">How can I fix this? Do I really need a class and recipe, or can I get away
with just having one or the other?</div></div></div></div></div></div></div></div></blockquote><div><br class=""></div><div>actually its better for you to latch onto image recipe via additional task defined in bbappend</div><div><br class=""></div><div><br class=""></div><div>something like below</div><div><br class=""></div><div><br class=""></div><div><div>addtask mytask after do_rootfs before do_build</div><div>do_mytask[depends] += "${PN}:do_rootfs"</div><div>do_mytask[depends] += "virtual/kernel:do_deploy"</div><div># We want to build updater everytime we build image</div><div>do_mytask[nostamp] = “1"</div><div><br class=""></div><div>do_mytask() {</div><div>}</div><div><br class=""></div></div></div></body></html>