All of lore.kernel.org
 help / color / mirror / Atom feed
* Recipe do_install priority
@ 2020-06-05 11:31 Mauro Ziliani
  2020-06-05 12:11 ` [yocto] " Alexander Kanavin
  2020-06-05 12:51 ` Laurent Gauthier
  0 siblings, 2 replies; 4+ messages in thread
From: Mauro Ziliani @ 2020-06-05 11:31 UTC (permalink / raw)
  To: yocto

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Recipe do_install priority
  2020-06-05 11:31 Recipe do_install priority Mauro Ziliani
@ 2020-06-05 12:11 ` Alexander Kanavin
  2020-06-05 12:51 ` Laurent Gauthier
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2020-06-05 12:11 UTC (permalink / raw)
  To: Mauro Ziliani; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

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

On Fri, 5 Jun 2020 at 13:31, Mauro Ziliani <mauro@faresoftware.it> 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
>
> 
>

[-- Attachment #2: Type: text/html, Size: 2008 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Recipe do_install priority
  2020-06-05 11:31 Recipe do_install priority Mauro Ziliani
  2020-06-05 12:11 ` [yocto] " Alexander Kanavin
@ 2020-06-05 12:51 ` Laurent Gauthier
  2020-06-05 19:19   ` Khem Raj
  1 sibling, 1 reply; 4+ messages in thread
From: Laurent Gauthier @ 2020-06-05 12:51 UTC (permalink / raw)
  To: Mauro Ziliani; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]

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@faresoftware.it> 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

[-- Attachment #2: Type: text/html, Size: 3034 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Recipe do_install priority
  2020-06-05 12:51 ` Laurent Gauthier
@ 2020-06-05 19:19   ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2020-06-05 19:19 UTC (permalink / raw)
  To: Laurent Gauthier, Mauro Ziliani; +Cc: yocto



On 6/5/20 5:51 AM, Laurent Gauthier wrote:
> 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.

> 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 <mauro@faresoftware.it 
> <mailto:mauro@faresoftware.it>> 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 way
> 
> 
>     library:do_install after init-ifupdown:do_install
> 
> 
>     that means  run do_install of library.bb <http://library.bb> afger
>     do_install of
>     init-ifupdown.bb <http://init-ifupdown.bb>
> 
> 
>     Any idea?
> 
> 
>     MZ
> 
> 
> 
> 
> -- 
> Laurent Gauthier
> Embedded Linux Systems & Software
> Phone: +33 630 483 429
> http://soccasys.com
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-05 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 11:31 Recipe do_install priority Mauro Ziliani
2020-06-05 12:11 ` [yocto] " Alexander Kanavin
2020-06-05 12:51 ` Laurent Gauthier
2020-06-05 19:19   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.