Re: Recipe do_install priority


Laurent Gauthier
 

Hi Mauro, all,

During the creation of the rootfs of your image yocto will try to install both packages, and should complain loudly because the same file is provided by two packages.

There are a few ways you can do this properly:

a) the straight-forware way is be to create a bbappend for init-ifupdown that updates the contentious file with the content that you need, and NOT provide this file in your library.bb

b) you could also createa bbappend for init-ifupdown which remove that file from the installation in a do_install_append, and then you are free to install it in your library.bb as it is not longer part of init-ifupdown. This is not too complex.

c) another option is to try to use alternatives which allows the same file to be delivered by several packages, and which one is used is selected at install and/or runtime by using symbolic links (example: vi vs vim). This requires a bit more research.

I am afraid that options other than these straight-forward ones will qualify for the title of "horrible hacks"... :-)

Kind regards, Laurent.


On Fri, Jun 5, 2020 at 1:31 PM Mauro Ziliani <mauro@...> wrote:
Hi all.

I'm Mauro.

I have to resolve this matter.

The recipe  init-ifupdown.bb install file interfaces in /etc/network.


I build a library which need to install the same file in the same folder.

This library is managed by its own recipe  library.bb in my meta-mylayer.


How can I tell to bitbake to install library after init-ifupdown in
final image?


The best for me should be drive this behavoir in the recipe-image.bb in
this way


library:do_install after init-ifupdown:do_install


that means  run do_install of library.bb afger do_install of
init-ifupdown.bb


Any idea?


MZ




--
Laurent Gauthier
Embedded Linux Systems & Software
Phone: +33 630 483 429
http://soccasys.com

Join yocto@lists.yoctoproject.org to automatically receive all group messages.