Hi,

On Tue, Nov 01, 2022 at 10:10:45AM +0100, Alexander Kanavin wrote:
> On Tue, 1 Nov 2022 at 09:12, Peter Bergin <[email protected]> wrote:
> > This opened my eyes for the way systemd recipes are built up in oe-core.
> > It seems a bit the other way around. systemd.inc contains almost only
> > version information. systemd_251.4.bb is huge and contains a lot of
> > thing that I think can be shared among versions. If it had been the
> > other way around it had been easy to have a systemd_git.bb, including
> > systemd.inc, in my local layer (or upstream if desired) that build
> > systemd main branch. What do you think of that? Is is worth working on
> > such a patch? Or are there reasons for that setup?
> 
> I prefer the opposite actually. Where possible, I fold the .inc files
> into the main recipe because that makes maintenance easier, and if
> someone needs to change that in non-upstreamable manner, they have to
> perform a full fork in a private layer. I do not like bits and pieces
> of code scattered all over the place and gathered together by bitbake,
> that does not help readability.

systemd contains both compiled code and large amounts of config files
which frequently need to be changed in various ways in real products. Think of
all the defaults for systemd-networkd, systemd-journald, service files etc.

Thus, it is common to have a bbappend for it which either patches
or otherwise changes these config files (e.g. sed in a
do_install_append()).

In these cases full fork of the poky side recipe is not needed or even
wanted.

What breaks these use cases is use of :append to change various
variables which users also need to change. A SRC_URI:append with 10's of
patches needs SRC_URI:remove for all of them, possibly increasing with
every security update gets really annoying in a .bbappend and users will
need to fully fork the recipes.

The .bb or .inc way of handling the main recipe doesn't really matter as
long it easy in a .bbappend to amend things to the variables like
SRC_URI and that these amendments work when there are small updates to
the recipe from e.g. LTS branch.

Cheers,

-Mikko
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#172356): 
https://lists.openembedded.org/g/openembedded-core/message/172356
Mute This Topic: https://lists.openembedded.org/mt/94696056/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to