[yocto] Best way to reuse install scripts across multiple recipes?

Brad Litterell brad at evidence.com
Thu Sep 26 11:09:23 PDT 2013


I'm finding that I use a pattern like this in a number of recipes to install all the files that exist in a particular folder, generally scripts or data files:

    # copy scripts
    pushd ${S}/files/bin
    # note that failure in the exec is not always captured here, so this needs to be enhanced
    # to catch that kind of build failure.
    find . -type f -exec install -m 0644 {} ${D}/bin/{} \;
    popd

As the comment exists, I need to expand this to a real loop with error handing, so I'm wondering if (a) there already exists a similar call that I can reuse in yocto (similar to oe_libinstall), or (b) whether I should add it to utils.bbclass, or a private recipe.  Would it be useful to submit back to the project?  Or am I just going about a common task the wrong way?

I'm thinking of adding a function like this:

oe_folderinstall <source> <dest> <mode>

Thanks,
Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130926/b6ea342c/attachment.html>


More information about the yocto mailing list