All of lore.kernel.org
 help / color / mirror / Atom feed
* How to enforce installation of image specific config file/package
@ 2016-04-01  9:34 Isak Lichtenstein
  2016-04-01 11:46 ` Esponde, Joel
  2016-04-01 12:34 ` Mike Looijmans
  0 siblings, 2 replies; 6+ messages in thread
From: Isak Lichtenstein @ 2016-04-01  9:34 UTC (permalink / raw)
  To: yocto

Hi,

I've got a package "A" that has a runtime dependency to a configuration file. This configuration file is image specific. For each image I've got a specific configuration package "config-image-X" that installs this needed configuration file and I build multiple image in the same build directory.
How can I enforce that each image containing package "A" also installs an image specific configuration package? 
I've tried with virtual providers, but then at the second image it always tried to install the virtual provider from the first image as well, which leads to the following failure during the rootfs task:

check_data_file_clashes: Package config-image-1 wants to install file /home/root/build/build_dev/tmp/work/poky-linux-gnueabi/core-image-test/1.0-r0/rootfs/usr/bin/config
	But that file is already provided by package  * config-image-2


I'm using yocto jethro.

Best regards

Isak


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

* Re: How to enforce installation of image specific config file/package
  2016-04-01  9:34 How to enforce installation of image specific config file/package Isak Lichtenstein
@ 2016-04-01 11:46 ` Esponde, Joel
  2016-04-01 12:38   ` Isak Lichtenstein
  2016-04-01 12:34 ` Mike Looijmans
  1 sibling, 1 reply; 6+ messages in thread
From: Esponde, Joel @ 2016-04-01 11:46 UTC (permalink / raw)
  To: Isak Lichtenstein, yocto

Hi,

One idea may be to create one recipe per configuration file.
So in each image recipe, you would add one of those recipes to IMAGE_INSTALL_append.

Interested in other ideas for this use case!

Joël Esponde
Honeywell | Sensing and Productivity Solutions

> -----Message d'origine-----
> De : yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] De la part de Isak Lichtenstein
> Envoyé : vendredi 1 avril 2016 11:35
> À : yocto@yoctoproject.org
> Objet : [yocto] How to enforce installation of image specific config
> file/package
> 
> Hi,
> 
> I've got a package "A" that has a runtime dependency to a configuration file.
> This configuration file is image specific. For each image I've got a specific
> configuration package "config-image-X" that installs this needed
> configuration file and I build multiple image in the same build directory.
> How can I enforce that each image containing package "A" also installs an
> image specific configuration package?
> I've tried with virtual providers, but then at the second image it always tried
> to install the virtual provider from the first image as well, which leads to the
> following failure during the rootfs task:
> 
> check_data_file_clashes: Package config-image-1 wants to install file
> /home/root/build/build_dev/tmp/work/poky-linux-gnueabi/core-image-
> test/1.0-r0/rootfs/usr/bin/config
> 	But that file is already provided by package  * config-image-2
> 
> 
> I'm using yocto jethro.
> 
> Best regards
> 
> Isak
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

* Re: How to enforce installation of image specific config file/package
  2016-04-01  9:34 How to enforce installation of image specific config file/package Isak Lichtenstein
  2016-04-01 11:46 ` Esponde, Joel
@ 2016-04-01 12:34 ` Mike Looijmans
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Looijmans @ 2016-04-01 12:34 UTC (permalink / raw)
  To: Isak Lichtenstein, yocto

On 01-04-16 11:34, Isak Lichtenstein wrote:
> Hi,
>
> I've got a package "A" that has a runtime dependency to a configuration file. This configuration file is image specific. For each image I've got a specific configuration package "config-image-X" that installs this needed configuration file and I build multiple image in the same build directory.
> How can I enforce that each image containing package "A" also installs an image specific configuration package?

If the "config" package is image-specific, you could just invert the 
dependency. Make the config package RDEPEND on "A". Images that install the 
config (which they have to do anyway according to your description) will then 
automatically install "A" which at least accomplishes that you don't need to 
specify both.

I've been in the same position, and it just isn't possible to do what you want.




Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail







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

* Re: How to enforce installation of image specific config file/package
  2016-04-01 11:46 ` Esponde, Joel
@ 2016-04-01 12:38   ` Isak Lichtenstein
  2016-04-02  8:12     ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Isak Lichtenstein @ 2016-04-01 12:38 UTC (permalink / raw)
  To: 'Esponde, Joel', yocto

Hi Joël,
> 
> Hi,
> 
> One idea may be to create one recipe per configuration file.
> So in each image recipe, you would add one of those recipes to
> IMAGE_INSTALL_append.

That's exactly what I'm doing now. But as my base package "A" is in a 
layer that is used by other developers, I would like to enforce somehow
that every image containing this package also provides a config package
for it.

BR

Isak
> 
> Interested in other ideas for this use case!
> 
> Joël Esponde
> Honeywell | Sensing and Productivity Solutions
> 
> > -----Message d'origine-----
> > De : yocto-bounces@yoctoproject.org [mailto:yocto-
> > bounces@yoctoproject.org] De la part de Isak Lichtenstein Envoyé :
> > vendredi 1 avril 2016 11:35 À : yocto@yoctoproject.org Objet : [yocto]
> > How to enforce installation of image specific config file/package
> >
> > Hi,
> >
> > I've got a package "A" that has a runtime dependency to a configuration file.
> > This configuration file is image specific. For each image I've got a
> > specific configuration package "config-image-X" that installs this
> > needed configuration file and I build multiple image in the same build directory.
> > How can I enforce that each image containing package "A" also installs
> > an image specific configuration package?
> > I've tried with virtual providers, but then at the second image it
> > always tried to install the virtual provider from the first image as
> > well, which leads to the following failure during the rootfs task:
> >
> > check_data_file_clashes: Package config-image-1 wants to install file
> > /home/root/build/build_dev/tmp/work/poky-linux-gnueabi/core-image-
> > test/1.0-r0/rootfs/usr/bin/config
> > 	But that file is already provided by package  * config-image-2
> >
> >
> > I'm using yocto jethro.
> >
> > Best regards
> >
> > Isak
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto


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

* Re: How to enforce installation of image specific config file/package
  2016-04-01 12:38   ` Isak Lichtenstein
@ 2016-04-02  8:12     ` Khem Raj
  2016-04-12 14:36       ` Isak Lichtenstein
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2016-04-02  8:12 UTC (permalink / raw)
  To: Isak Lichtenstein; +Cc: yocto

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


> On Apr 1, 2016, at 5:38 AM, Isak Lichtenstein <Isak.Lichtenstein@kistler.com> wrote:
> 
> Hi Joël,
>> 
>> Hi,
>> 
>> One idea may be to create one recipe per configuration file.
>> So in each image recipe, you would add one of those recipes to
>> IMAGE_INSTALL_append.
> 
> That's exactly what I'm doing now. But as my base package "A" is in a
> layer that is used by other developers, I would like to enforce somehow
> that every image containing this package also provides a config package
> for it.

you can use bitbake diagnostics in a image post process function to implement this logic
or in a bbclass which is inherited by every image you build.

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

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

* Re: How to enforce installation of image specific config file/package
  2016-04-02  8:12     ` Khem Raj
@ 2016-04-12 14:36       ` Isak Lichtenstein
  0 siblings, 0 replies; 6+ messages in thread
From: Isak Lichtenstein @ 2016-04-12 14:36 UTC (permalink / raw)
  To: 'Khem Raj'; +Cc: yocto

Hi Raj
> 
> 
> > On Apr 1, 2016, at 5:38 AM, Isak Lichtenstein <Isak.Lichtenstein@kistler.com>
> wrote:
> >
> > Hi Joël,
> >>
> >> Hi,
> >>
> >> One idea may be to create one recipe per configuration file.
> >> So in each image recipe, you would add one of those recipes to
> >> IMAGE_INSTALL_append.
> >
> > That's exactly what I'm doing now. But as my base package "A" is in a
> > layer that is used by other developers, I would like to enforce
> > somehow that every image containing this package also provides a
> > config package for it.
> 
> you can use bitbake diagnostics in a image post process function to implement
> this logic or in a bbclass which is inherited by every image you build.

Thank you for your suggestion. Will try to solve it as you suggest, but I will need
to kneel myself into the bitbake library classes to see what methods they provide
to easily implement this bbclass.


> >> > Hi,
> >> > 
> >> > I've got a package "A" that has a runtime dependency to a configuration file.
> >> > This configuration file is image specific. For each image I've got a 
> >> > specific configuration package "config-image-X" that installs this 
> >> > needed configuration file and I build multiple image in the same build directory.
> >> > How can I enforce that each image containing package "A" also installs 
> >> > an image specific configuration package?
> >> > I've tried with virtual providers, but then at the second image it 
> >> > always tried to install the virtual provider from the first image as 
> >> > well, which leads to the following failure during the rootfs task:
> >> > 
> >> > check_data_file_clashes: Package config-image-1 wants to install file
> >> > /home/root/build/build_dev/tmp/work/poky-linux-gnueabi/core-image-
> >> > test/1.0-r0/rootfs/usr/bin/config
> >> > 	But that file is already provided by package  * config-image-2

Nevertheless, when I tried using the provider class, I found it's behavior 
a bit weird.

When I have a package build dependency and 2 providers, I expect that 
Yocto pull in/uses the provider with the highest priority.
But if a package has got a run time dependency, and the image containing 
the package also includes already a provider for the package, I would expect 
that the run time dependency is satisfied despite the provider included isn't the
one with the highest prio. In reality I found that the image always tried to also 
include the highest prio provider.

Is that really the expected behavior?

BR

Isak




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

end of thread, other threads:[~2016-04-12 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01  9:34 How to enforce installation of image specific config file/package Isak Lichtenstein
2016-04-01 11:46 ` Esponde, Joel
2016-04-01 12:38   ` Isak Lichtenstein
2016-04-02  8:12     ` Khem Raj
2016-04-12 14:36       ` Isak Lichtenstein
2016-04-01 12:34 ` Mike Looijmans

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.