Re: Image dependent variables/files in included recipes
Quentin Schulz
Hi Maik,
On 11/17/22 16:22, Maik Vermeulen wrote: Hi,Development vs production is solved by using different distros. You can then have the same recipe but with different files (see (DISTRO)OVERRIDES mechanism for SRC_URI file:// files, c.f. https://summit.yoctoproject.org/media/yocto-project-summit-2022-05/submissions/SCYYWD/resources/Demystifying_the_OVERRIDES_mec_2lZOP3n.pdf) and/or different variables via FOO:dev-distro or FOO:append:dev-distro for example. You could also have different recipes both PROVIDES'ing the same virtual recipe and then have PREFERRED_PROVIDER_my-recipe = "my-recipe-dev" in your dev-distro.conf file. Two distros is usually overkill when you have very small and non-invasive differences between your dev and prod images (e.g. an additional package, or a lone package that needs to be slightly different). In that scenario, a "drity" solution is to have two recipes and have the final image pick the appropriate package. But this quickly does not scale well once you have recipes/packages depending on those or if you have more than two flavors to support. The best practice is to use two distros. Cheers, Quentin |
|