On 10 October 2013 16:02, Seth Bollinger <seth.b...@gmail.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.

Use $D instead of ${D}. ${D} will get expanded when the package is
created but you want to use the environment variable $D.

Ross
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to