[yocto] Problems with postinstall

Neuer User auslands-kv at gmx.de
Fri Jun 6 05:37:56 PDT 2014


Am 06.06.2014 14:31, schrieb Burton, Ross:
> On 6 June 2014 12:08, Neuer User <auslands-kv at gmx.de> wrote:
>>> The postinst is executed by the package manager when the package is
>>> installed. If that installation takes place during do_rootfs, ${D}
>>> will refer to the rootfs directory for the image being built and ${S}
>>> will probably refer to something else to do with the image recipe but
>>> I'm not entirely sure on the details. If the installation takes place
>>> on the device, or the postinst is delayed until the first boot, ${D}
>>> and ${S} will not be set.
>>>
>>> Hope this helps,
>>>
>>
>> So, I guess there are now two possibilities:
>> a.) The postinstall is not done at all.
>> b.) The postinstall is done, but before the other packages are
>> installed, which overwrite the files again. Is this possible? If yes,
>> howto specify that this postinstall should really be done last of all?
> 
> Basically a postinstall is *not* the way of doing this.  You can't
> control when it runs and when it does, you can't get to the files you
> want to install.
> 
> If the files are installed by other packages then use a bbappend to
> change those files.  If nothing installs them already, write a recipe
> to install them.  If there are changes that can only be done at rootfs
> time, then use a rootfs postproces command.
> 
> Ross
> 
Thanks Ross

I guess the "rootfs postprocess command" is the way to go.

I have already separated the files into new files (which get installed
as a normal install process by that package) and files that overwrite
other package files.

I guess, I could for most (but not all) files add a bbappend to the
relevant original package, but it would be more complicated than doing
it all together at rootfs postprocess.

Thanks for all the help. I will try the rootfs postprocess today :-)

Cheers

Michael




More information about the yocto mailing list