From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>,
Joshua Watt <JPEWhacker@gmail.com>,
Alexander Kanavin <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH 2/5] meta/files: add layer setup JSON schema and example
Date: Wed, 17 Aug 2022 23:27:41 +0100 [thread overview]
Message-ID: <d3d5ec04d1b0caec5f0e8f7578e40b3f055e10d9.camel@linuxfoundation.org> (raw)
In-Reply-To: <CANNYZj-1c9cd1Q9LodoxrMxkhBTbOTdg3gb=TVyVdWJ6inMO4w@mail.gmail.com>
On Wed, 2022-08-17 at 23:36 +0200, Alexander Kanavin wrote:
> On Wed, 17 Aug 2022 at 22:52, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > One thing that concerns me a little is that this mixes two things,
> > layer setup (as in repos) and configuration. I'm nervous about json
> > config which effectively has to duplicate the list of machines/distros
> > in layers.
> >
> > Where is the distro/machine data used?
>
> The use case I was thinking of is doing something useful with this
> information *before* doing actual checkout. I would even appreciate
> knowing in advance - maybe even by just looking at the json through
> gitweb ui - which machines, distros and config templates I would be
> getting, and from which layers.
The trouble is that others already went a different direction with this
which is why we have layer index and the concept of local layer indexes
as well we the ability for bblayers to talk to such indexes if I'm
remembering correctly.
An advantage it has is that it does parse the layers so it can cache
other information too.
My worry is that you have two copies of this information, one in the
json and one in the metadata and effectively by that fact, one of them
will be wrong.
You could report it to the user with a directory listing of the remote
repo via git.
> Also the proposed oe-setup tool could
> do useful things with this information, if it operates from the json
> definitions in the same format. You can discover and supply all needed
> information up front, and oe-setup will land you in a bitbake session.
> Without it, you have to first do the layer setup, then the
> configuration discovery, then the configuration setup, as separate
> commands - I'd say that would be an inferior experience for the users.
I think you can get a lot of this information relatively easily and
possibly without a clone, via a layer index or probably through a
remote git command too.
> > Are these the only config options people will want to add or will we
> > have others? init system? libc? Or feature information about which
> > configurations are expected to work? I worry this is a magnet for
> > future feature creep and duplication of information.
>
> These are not the same, as machines and distros are specifically
> defined in layers as .conf files in pre-determined locations. Other
> things are defined as variables in files, and aren't as easily
> discoverable by code. I only want to allow programmatically
> discoverable options (that are guaranteed to be in lockstep with the
> layer revision) in the json; no one should ever write or modify the
> json by hand.
I'm not sure that will scale for what users want then (which I suspect
is why we ended up with the layer index instead).
> > I can see where the buildconfigs are used but again, does the json file
> > need to encode those or could you determine them by inspection of the
> > layers once setup?
>
> In addition to the above point (knowing them in advance is useful),
> there is no fixed location for these in layers. You could perhaps walk
> the layer trees, but I'd rather place the info in the json.
I have wondered if we should define one. I kind of have a plan in mind
to turn the majority of the autobuilder configurations into config
files somewhere in OE-Core to make it easier for people to reproduce
autobuilder configs too, which may be an interesting example of that.
> > Also, if there is new version of this series, could you squash in these
> > copyright/license tweaks please:
> >
> > https://git.yoctoproject.org/poky/commit/?h=master-next&id=45b396298c1dd638bb702f5251b4a663f07978ca
>
> This is the easy part :-) Hope the above clarifies a bit what went on
> in my head when I was writing the code.
It does, thanks. I'm just not sure we're quite in the right place with
things. I know in your other reply you say we have to start somewhere
and we can change things. I also know the screaming if we try and
remove something later...
Cheers,
Richard
next prev parent reply other threads:[~2022-08-17 22:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 13:10 [PATCH 1/5] bitbake-layers: add a command to save the active build configuration as a template into a layer Alexander Kanavin
2022-08-17 13:10 ` [PATCH 2/5] meta/files: add layer setup JSON schema and example Alexander Kanavin
2022-08-17 20:52 ` [OE-core] " Richard Purdie
2022-08-17 21:36 ` Alexander Kanavin
2022-08-17 22:27 ` Richard Purdie [this message]
2022-08-18 8:24 ` Alexander Kanavin
2022-08-18 9:27 ` Richard Purdie
2022-09-01 15:29 ` Configuration fragments Alexander Kanavin
2022-09-01 22:47 ` [Openembedded-architecture] " Mark Hatle
2022-08-17 22:16 ` [OE-core] [PATCH 2/5] meta/files: add layer setup JSON schema and example Alexander Kanavin
2022-08-17 13:10 ` [PATCH 3/5] bitbake-layers: add ability to save current layer repository configuration into a json file Alexander Kanavin
2022-08-17 13:10 ` [PATCH 4/5] scripts/oe-setup-layers: add a script that restores the layer configuration from " Alexander Kanavin
2022-08-21 22:04 ` [OE-core] " Philip Balister
2022-08-22 7:45 ` Alexander Kanavin
2022-08-22 1:20 ` Chuck Wolber
2022-08-22 7:52 ` Alexander Kanavin
2022-08-17 13:10 ` [PATCH 5/5] selftest/bblayers: add a test for creating a layer setup and using it to restore the layers Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3d5ec04d1b0caec5f0e8f7578e40b3f055e10d9.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=JPEWhacker@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox