Recipe do_install priority
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
do_install() is not installing things into the final image. It is installing items to the target location under a separate 'destination directory', independently of anything else that installs to the same target location under different destination directory. If the filenames are the same, you will get a file conflict error later on when the image is constructed.
It would help if you describe in detail what file do you intend to replace, and why.
Alex
Quoted 36 lines · Mauro Ziliani
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_installof library.bb afgerdo_installof init-ifupdown.bbAny idea?
MZ
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.
Quoted 36 lines · Mauro Ziliani
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_installof library.bb afgerdo_installof init-ifupdown.bbAny idea?
MZ
Signature · 4 lines
Laurent Gauthier Embedded Linux Systems & Software Phone: +33 630 483 429 http://soccasys.com
Quoted 8 lines · 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 <http://library.bb>
this is best course of action, for maintainance POV as well as readability, I know of custom packages that bundled bits and pieces into a single package like this and call it some meta package but ideally, its better to stay with upstream packaging conventions. Its less work eventually to maintain.
Quoted 60 lines
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 <http://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 <[email protected] <mailto:[email protected]>> wrote:
Hi all.
I'm Mauro.
I have to resolve this matter.
The recipe init-ifupdown.bb <http://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
<http://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
<http://recipe-image.bb> in
this waylibrary:do_install after init-ifupdown:do_install
that means run
do_installof library.bb <http://library.bb> afgerdo_installof
init-ifupdown.bb <http://init-ifupdown.bb>Any idea?
MZ
Signature · 4 lines
Laurent Gauthier Embedded Linux Systems & Software Phone: +33 630 483 429 http://soccasys.com