[yocto] Get rid of opkg install error

Paul Barker paul at paulbarker.me.uk
Wed Mar 26 04:54:28 PDT 2014


On 26 March 2014 11:29, Diego Sueiro <diego.sueiro at gmail.com> wrote:
>
> On Wed, Mar 26, 2014 at 8:16 AM, Paul Barker <paul at paulbarker.me.uk> wrote:
>>
>> On 26 March 2014 09:47, Diego Sueiro <diego.sueiro at gmail.com> wrote:
>> > Folks,
>> >
>> > I have a image recipe which installs some custom files on rootfs.
>> > Instead of having a bbappend for each package that provides those files
>> > I
>> > want to concentrate it on image recipe.
>>
>> Why do you want to merge all your custom files into one recipe? With
>> them separated into the packages they affect you can add/remove
>> packages a lot easier in the future.
>
>
> Because I want to have different image recipes for different proposes.
> For example: One image with eth0 on dhcp and another one with static ip. Or
> some different images for product variations.
>

Ok, I understand you now. I need to work out a way of handling this
for future systems I'll be working on but it's not something I've
needed to do so far.

I would probably lean in the direction of using bbappends and
generating all config packages during a build (because a package of
custom config files shouldn't have a long build time). So you'd have
init-ifupdown-image1config, init-ifupdown-image2config, etc. Then in
each image recipe I'd select which package is installed.

That does leave it spread between bbappend files as it's grouped by
functionality rather than by target image. I'm not sure how to
efficiently group it the other way around.

>>
>>
>> >
>> > The problem is that I'm receiving the following error:
>> >
>> > "But that file is already provided by package"
>> >
>> >
>> > Is there a way to get rid of this error?
>>
>> The only thing I can think of is to use bbappends to prevent the
>> original files from installing but not to add the replacement files.
>> Then have a single recipe which packages all the replacement files.
>> That way only one package provides each file.
>
>
> This is a possible solution. But if I build an image without these custom
> files (core-image-minimal for example) the original ones will not be
> shipped. Am I correct?
> Or maybe I can check for a custom variable defined at local.conf and check
> for it on bbappend to know if I have to remove or not the original files.
>

Yes, that would be the issue there. Not sure how well a local.conf
check would work.

-- 
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the yocto mailing list