[yocto] Recipes that update a shared file
Seth Bollinger
seth.boll at gmail.com
Thu Oct 10 08:02:07 PDT 2013
On Thu, Oct 10, 2013 at 9:40 AM, Burton, Ross <ross.burton at intel.com> wrote:
> You need to use $D so that you're not attempting to write to the *host's*
> /etc:
>
> echo test >> $D/etc/inittest2
>
> In a postinst $D may be set, and if it is then the postinst is being
> ran on the host at rootfs time, and points to where the rootfs is
> being constructed.
>
Ok, I changed to as follows:
pkg_postinst_${PN} () {
echo "testtest" >> ${D}/etc/inittest
}
After that I do a find and the file is only populated in the recipe's image
directory, not the rootfs.
$ find . -iname inittest
./tmp/work/armv5te-dbl-linux-gnueabi/widget/1.0-r0/image/etc/inittest
Thanks!
Seth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20131010/3bff2f8a/attachment.html>
More information about the yocto
mailing list