On Sat, Jun 20, 2020 at 10:04 PM William Kenworthy <bi...@iinet.net.au> wrote:
>
> I cant see any
> advantage to having multiple ebuilds for a package instead of using a
> support framework to deal with it other than exposing multiple
> opportunities for things to go wrong and make it harder to fix. This not
> an elegant design!

Uh, refactoring shared code into modules is generally considered the
best design.

Generally packages are split up when they are shared, or when they
have different update cycles or upstreams.  The details around the
splits vary between packages but if you cite and example it probably
will be easy to explain why that particular example was split.

KDE/Plasma was split up because it makes no sense to rebuild 500
binaries when one of them has a security update.

Those account ebuilds were split out because multiple packages could
require the same group, and this helps ensure the default uid/gid
doesn't change depending on what order you install packages in.

Packages like systemd/openrc tend to be a little more modular because
they may require integration with other things and it doesn't make
sense to replicate that integration across many versions of the
packages on both sides.

mysql-init-scripts is a separate package because it gets shared
between mysql and mariadb.  This isn't done often, but it does have
the side benefit that if there is a bug in the init.d script you don't
have to rebuild the whole database server to get a new bash script.

You have virtual packages because sometimes you want to depend on a
capability and not a specific package.  For example you need an mta to
be installed but you don't care which one it is, and so as a result
you see virtuals show up in the install list even though they don't do
anything.

A fair bit of this comes from Gentoo's flexibility.  If we didn't
support 47 different ways of doing everything it would be much easier
to create monolithic packages.

In general we tend to find the balance.  Plenty of other distros take
this MUCH further than Gentoo does - though some of this is driven by
being binary.  The same source package works for any arch, but if
you're doing a binary distro the manpages might work for everybody but
obviously anything compiled has to be split up by arch.

-- 
Rich

Reply via email to