Date
1 - 8 of 8
Template handling in OE-Core
Richard Purdie
I'm starting a new thread/discussion on this with a new perspective.
I did a little research myself on how these files are being used. My
conclusion is that templateconf.cfg isn't really used by much at all
other than to decide whether to rerun setup pieces.
I'm going to make the assumption that once a build directory is setup,
the user does not want the env setup scripts messing with it again. If
they did, they'd start a new build directory.
As such:
a) showing the user a warning about the template locations changing is
probably not necessary
b) reading the value back in from templateconf.cfg isn't then necessary
as either the files don't exist and we set then up or we don't care
Therefore, my thinking is that we should simply remove
templateconf.cfg?
What am I missing?
Cheers,
Richard
I did a little research myself on how these files are being used. My
conclusion is that templateconf.cfg isn't really used by much at all
other than to decide whether to rerun setup pieces.
I'm going to make the assumption that once a build directory is setup,
the user does not want the env setup scripts messing with it again. If
they did, they'd start a new build directory.
As such:
a) showing the user a warning about the template locations changing is
probably not necessary
b) reading the value back in from templateconf.cfg isn't then necessary
as either the files don't exist and we set then up or we don't care
Therefore, my thinking is that we should simply remove
templateconf.cfg?
What am I missing?
Cheers,
Richard
Alexander Kanavin
For future enhancements, I would want to keep some kind of record
inside build/conf of where the original template was taken from. I
agree that build init scripts should not use it at all, but that
record can be utilized to either update the build config from an
updated template (with an explicit, separate command), or update the
template itself without having to specify where it is.
Alex
On Wed, 28 Sept 2022 at 10:42, Richard Purdie
<richard.purdie@...> wrote:
inside build/conf of where the original template was taken from. I
agree that build init scripts should not use it at all, but that
record can be utilized to either update the build config from an
updated template (with an explicit, separate command), or update the
template itself without having to specify where it is.
Alex
On Wed, 28 Sept 2022 at 10:42, Richard Purdie
<richard.purdie@...> wrote:
I'm starting a new thread/discussion on this with a new perspective.
I did a little research myself on how these files are being used. My
conclusion is that templateconf.cfg isn't really used by much at all
other than to decide whether to rerun setup pieces.
I'm going to make the assumption that once a build directory is setup,
the user does not want the env setup scripts messing with it again. If
they did, they'd start a new build directory.
As such:
a) showing the user a warning about the template locations changing is
probably not necessary
b) reading the value back in from templateconf.cfg isn't then necessary
as either the files don't exist and we set then up or we don't care
Therefore, my thinking is that we should simply remove
templateconf.cfg?
What am I missing?
Cheers,
Richard
Richard Purdie
On Wed, 2022-09-28 at 10:48 +0200, Alexander Kanavin wrote:
some kind of automated update or user warning message, you need a
version string in the file itself to know what version you're dealing
with so whilst I can see why you might be interested in that
information, I'm not convinced it is as useful as you'd first think as
you'll need other information anyway...
Regardless, it would suggest we should be ignoring the file (whether
create it or not).
Taking another example to suggest it is broken, what if I delete one of
the files and let the setup scripts recreate it after using a different
TEMPLATECONF setting? Which value should templateconf.cfg have?
Cheers,
Richard
For future enhancements, I would want to keep some kind of recordI wondered about that. The thing is if you're planning to decide to do
inside build/conf of where the original template was taken from. I
agree that build init scripts should not use it at all, but that
record can be utilized to either update the build config from an
updated template (with an explicit, separate command), or update the
template itself without having to specify where it is.
some kind of automated update or user warning message, you need a
version string in the file itself to know what version you're dealing
with so whilst I can see why you might be interested in that
information, I'm not convinced it is as useful as you'd first think as
you'll need other information anyway...
Regardless, it would suggest we should be ignoring the file (whether
create it or not).
Taking another example to suggest it is broken, what if I delete one of
the files and let the setup scripts recreate it after using a different
TEMPLATECONF setting? Which value should templateconf.cfg have?
Cheers,
Richard
Alexander Kanavin
On Wed, 28 Sept 2022 at 10:55, Richard Purdie
<richard.purdie@...> wrote:
does not yet exist,
but otherwise doesn't read or write to it.
https://git.yoctoproject.org/poky-contrib/commit/?h=akanavin/package-version-updates&id=0644e4cb1415b44833d57baf9d57845a331bb70b
Alex
<richard.purdie@...> wrote:
I wondered about that. The thing is if you're planning to decide to doI have already written a patch :) It creates templateconf.cfg if it
some kind of automated update or user warning message, you need a
version string in the file itself to know what version you're dealing
with so whilst I can see why you might be interested in that
information, I'm not convinced it is as useful as you'd first think as
you'll need other information anyway...
Regardless, it would suggest we should be ignoring the file (whether
create it or not).
Taking another example to suggest it is broken, what if I delete one of
the files and let the setup scripts recreate it after using a different
TEMPLATECONF setting? Which value should templateconf.cfg have?
does not yet exist,
but otherwise doesn't read or write to it.
https://git.yoctoproject.org/poky-contrib/commit/?h=akanavin/package-version-updates&id=0644e4cb1415b44833d57baf9d57845a331bb70b
Alex
Peter Kjellerstedt
toggle quoted message
Show quoted text
for TEMPLATECONF. I.e., if I remove the local.conf file to regenerate
it because there has been upstream changes, I would expect it to use
the TEMPLATECONF I specify at that time, and for that value to be
recorded for posterity.
That said, I doubt the value of TEMPLATECONF will actually change for
an existing build environment, so this is probably more on the
theoretical side.
//Peter
-----Original Message-----Personally, I would expect the file to contain the latest value used
From: Alexander Kanavin <alex.kanavin@...>
Sent: den 28 september 2022 11:07
To: Richard Purdie <richard.purdie@...>
Cc: openembedded-architecture <openembedded-
architecture@...>; Peter Kjellerstedt
<peter.kjellerstedt@...>
Subject: Re: Template handling in OE-Core
On Wed, 28 Sept 2022 at 10:55, Richard Purdie
<richard.purdie@...> wrote:I wondered about that. The thing is if you're planning to decide to doI have already written a patch :) It creates templateconf.cfg if it
some kind of automated update or user warning message, you need a
version string in the file itself to know what version you're dealing
with so whilst I can see why you might be interested in that
information, I'm not convinced it is as useful as you'd first think as
you'll need other information anyway...
Regardless, it would suggest we should be ignoring the file (whether
create it or not).
Taking another example to suggest it is broken, what if I delete one of
the files and let the setup scripts recreate it after using a different
TEMPLATECONF setting? Which value should templateconf.cfg have?
does not yet exist,
but otherwise doesn't read or write to it.
https://git.yoctoproject.org/poky-contrib/commit/?h=akanavin/package-version-updates&id=0644e4cb1415b44833d57baf9d57845a331bb70b
Alex
for TEMPLATECONF. I.e., if I remove the local.conf file to regenerate
it because there has been upstream changes, I would expect it to use
the TEMPLATECONF I specify at that time, and for that value to be
recorded for posterity.
That said, I doubt the value of TEMPLATECONF will actually change for
an existing build environment, so this is probably more on the
theoretical side.
//Peter
Alexander Kanavin
On Wed, 28 Sept 2022 at 16:25, Peter Kjellerstedt
<peter.kjellerstedt@...> wrote:
updated), and if you remove local.conf but not bblayers.conf, so that
one is updated, but not the other, it is not anymore possible to tell
what came from where. Creating it once at the start is more
straightforward, even if origins of further updates are not recorded.
Alex
<peter.kjellerstedt@...> wrote:
Personally, I would expect the file to contain the latest value usedThis would complicate the logic (update only if some config was
for TEMPLATECONF. I.e., if I remove the local.conf file to regenerate
it because there has been upstream changes, I would expect it to use
the TEMPLATECONF I specify at that time, and for that value to be
recorded for posterity.
That said, I doubt the value of TEMPLATECONF will actually change for
an existing build environment, so this is probably more on the
theoretical side.
updated), and if you remove local.conf but not bblayers.conf, so that
one is updated, but not the other, it is not anymore possible to tell
what came from where. Creating it once at the start is more
straightforward, even if origins of further updates are not recorded.
Alex
Peter Kjellerstedt
toggle quoted message
Show quoted text
However, as this patch solves our problem, I support applying this patch.
//Peter
-----Original Message-----Yeah, I guess it's a case of damned if you do, damned if you don't.
From: Alexander Kanavin <alex.kanavin@...>
Sent: den 28 september 2022 16:41
To: Peter Kjellerstedt <peter.kjellerstedt@...>
Cc: Richard Purdie <richard.purdie@...>; openembedded-
architecture <openembedded-architecture@...>
Subject: Re: Template handling in OE-Core
On Wed, 28 Sept 2022 at 16:25, Peter Kjellerstedt
<peter.kjellerstedt@...> wrote:Personally, I would expect the file to contain the latest value usedThis would complicate the logic (update only if some config was
for TEMPLATECONF. I.e., if I remove the local.conf file to regenerate
it because there has been upstream changes, I would expect it to use
the TEMPLATECONF I specify at that time, and for that value to be
recorded for posterity.
That said, I doubt the value of TEMPLATECONF will actually change for
an existing build environment, so this is probably more on the
theoretical side.
updated), and if you remove local.conf but not bblayers.conf, so that
one is updated, but not the other, it is not anymore possible to tell
what came from where. Creating it once at the start is more
straightforward, even if origins of further updates are not recorded.
Alex
However, as this patch solves our problem, I support applying this patch.
//Peter
Richard Purdie
On Wed, 2022-09-28 at 20:02 +0000, Peter Kjellerstedt wrote:
understand we might want to track where things came from, I think the
current way breaks for two files and doesn't give version information
anyway.
There may be a better way with a copy alongside of the template,
something involving symlinks or something else.
Meanwhile though I'll take this patch as it solves the problem enough
for release and as far as I can tell, shouldn't make anything worse.
Cheers,
Richard
Ultimately, I think we'll end up removing this file. Whilst I-----Original Message-----Yeah, I guess it's a case of damned if you do, damned if you don't.
From: Alexander Kanavin <alex.kanavin@...>
Sent: den 28 september 2022 16:41
To: Peter Kjellerstedt <peter.kjellerstedt@...>
Cc: Richard Purdie <richard.purdie@...>;
openembedded-
architecture <openembedded-architecture@...>
Subject: Re: Template handling in OE-Core
On Wed, 28 Sept 2022 at 16:25, Peter Kjellerstedt
<peter.kjellerstedt@...> wrote:Personally, I would expect the file to contain the latest valueThis would complicate the logic (update only if some config was
used
for TEMPLATECONF. I.e., if I remove the local.conf file to
regenerate
it because there has been upstream changes, I would expect it to
use
the TEMPLATECONF I specify at that time, and for that value to be
recorded for posterity.
That said, I doubt the value of TEMPLATECONF will actually change
for
an existing build environment, so this is probably more on the
theoretical side.
updated), and if you remove local.conf but not bblayers.conf, so
that
one is updated, but not the other, it is not anymore possible to
tell
what came from where. Creating it once at the start is more
straightforward, even if origins of further updates are not
recorded.
Alex
However, as this patch solves our problem, I support applying this
patch.
understand we might want to track where things came from, I think the
current way breaks for two files and doesn't give version information
anyway.
There may be a better way with a copy alongside of the template,
something involving symlinks or something else.
Meanwhile though I'll take this patch as it solves the problem enough
for release and as far as I can tell, shouldn't make anything worse.
Cheers,
Richard