* Getting a recipe's files from within an image recipe
@ 2018-02-02 12:16 colin.helliwell
2018-02-02 12:24 ` Alexander Kanavin
0 siblings, 1 reply; 4+ messages in thread
From: colin.helliwell @ 2018-02-02 12:16 UTC (permalink / raw)
To: yocto
I have an app which has a config file, and I'd like my two images
(production and dev) to have different configs. Obviously it'd be neater to
keep the two config files within the recipe's directory structure.
I guess I can't do this in the app's recipe since it has no concept of what
image it might end up in. So I could have the the app's recipe deploy one of
the configs by default, and use a step in the 'other' image recipe to
overwrite it.
But is there a way to tell the image recipe where the app's workdir/srcdir
is? Something like ${WORKDIR}_MyRecipe
Or am I just going to have to hard-code the path in?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Getting a recipe's files from within an image recipe
2018-02-02 12:16 Getting a recipe's files from within an image recipe colin.helliwell
@ 2018-02-02 12:24 ` Alexander Kanavin
2018-02-02 12:30 ` Colin Helliwell
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Kanavin @ 2018-02-02 12:24 UTC (permalink / raw)
To: colin.helliwell, yocto
On 02/02/2018 02:16 PM, colin.helliwell@ln-systems.com wrote:
> I have an app which has a config file, and I'd like my two images
> (production and dev) to have different configs. Obviously it'd be neater to
> keep the two config files within the recipe's directory structure.
> I guess I can't do this in the app's recipe since it has no concept of what
> image it might end up in. So I could have the the app's recipe deploy one of
> the configs by default, and use a step in the 'other' image recipe to
> overwrite it.
> But is there a way to tell the image recipe where the app's workdir/srcdir
> is? Something like ${WORKDIR}_MyRecipe
> Or am I just going to have to hard-code the path in?
Maybe the easiest is to have two separate recipes for the two versions
of config and have images pull in one or the other?
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Getting a recipe's files from within an image recipe
2018-02-02 12:24 ` Alexander Kanavin
@ 2018-02-02 12:30 ` Colin Helliwell
2018-02-02 12:34 ` Alexander Kanavin
0 siblings, 1 reply; 4+ messages in thread
From: Colin Helliwell @ 2018-02-02 12:30 UTC (permalink / raw)
To: Alexander Kanavin, yocto
> On 02 February 2018 at 12:24 Alexander Kanavin wrote:
>
>
> On 02/02/2018 02:16 PM, colin.helliwell@ln-systems.com wrote:
> > I have an app which has a config file, and I'd like my two images
> > (production and dev) to have different configs. Obviously it'd be neater to
> > keep the two config files within the recipe's directory structure.
> > I guess I can't do this in the app's recipe since it has no concept of what
> > image it might end up in. So I could have the the app's recipe deploy one of
> > the configs by default, and use a step in the 'other' image recipe to
> > overwrite it.
> > But is there a way to tell the image recipe where the app's workdir/srcdir
> > is? Something like ${WORKDIR}_MyRecipe
> > Or am I just going to have to hard-code the path in?
>
> Maybe the easiest is to have two separate recipes for the two versions
> of config and have images pull in one or the other?
>
> Alex
Thanks Alex. I half-had that thought too, but was hoping to do it with the one 'src checkout' of the whole app rather than extra two. Not that that really matters, and it seems it may be the neatest and most robust solution.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Getting a recipe's files from within an image recipe
2018-02-02 12:30 ` Colin Helliwell
@ 2018-02-02 12:34 ` Alexander Kanavin
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2018-02-02 12:34 UTC (permalink / raw)
To: Colin Helliwell, yocto
On 02/02/2018 02:30 PM, Colin Helliwell wrote:
> Thanks Alex. I half-had that thought too, but was hoping to do it with the one 'src checkout' of the whole app rather than extra two. Not that that really matters, and it seems it may be the neatest and most robust solution.
>
I believe source checkout is indeed performed only once, even if you
have ten different recipes referring to the same SRC_URI. Just throw
away the configure-compile-install steps, and focus only on installing
the correct configs.
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-02 12:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-02 12:16 Getting a recipe's files from within an image recipe colin.helliwell
2018-02-02 12:24 ` Alexander Kanavin
2018-02-02 12:30 ` Colin Helliwell
2018-02-02 12:34 ` Alexander Kanavin
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.