Hi, Quentin Ah, this is great. This looks exactly like what I was looking for. I appreciate the timely response.
Thank you, Logan ________________________________ From: Quentin Schulz <quentin.sch...@theobroma-systems.com> Sent: Monday, September 18, 2023 8:50 AM To: Logan Grosz <logan.gr...@b9c.com>; yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> Subject: Re: [yocto] Overriding package configuration as a distro Hi Logan, On 9/18/23 16:43, Logan Grosz via lists.yoctoproject.org wrote: > You don't often get email from logan.grosz=b9c....@lists.yoctoproject.org. > Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> > Hi, all > > I have two distros in the same meta layer, "A" and "B," and a recipe which > installs a configuration file existing in a layer elsewhere. "A" and "B" > should provide different configuration files, overriding the original > configuration. It seems less than ideal to create a bbappend in this scenario > as that would require the bbappend to know about the various distros and even > handle the case where neither distro is chosen, some other "C" distro may be > built for. My goal is a distro-centric configuration rather than a > recipe/package-centric one. How can I do this? Does this align with the > framework, or should I be looking into a different solution for this problem? > The distro name is already part of FILESOVERRIDES so you can just add your configuration file in a directory named after your distro. e.g. provided your distro is called logan-distro, the following makes it possible to override the configuration file from another layer: ``` # cat recipes-foo/bar/bar-1.0.0/logan-distro/file.conf meh # cat recipes-foo/bar/bar_1.0.0.bbappend FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-${PV}:" ``` no need to modify anything else if the file.conf file is added via SRC_URI mechanism, otherwise you'll need to add a bit more to the bbappend (or use patches instead), probably via a do_configure:prepend or even do_patch:append (I think the file fetcher also allows to install directly in the proper directory via subdir= parameter?). Cheers, Quentin
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61035): https://lists.yoctoproject.org/g/yocto/message/61035 Mute This Topic: https://lists.yoctoproject.org/mt/101434764/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-