public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/8] Split off remaining functions from eutils.eclass
@ 2020-09-10 19:08 Ulrich Müller
  2020-09-10 19:08 ` [gentoo-dev] [PATCH 1/8] eutils.eclass: Specify supported EAPIs Ulrich Müller
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Ulrich Müller @ 2020-09-10 19:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Ulrich Müller

In the old times, eutils.eclass used to be inherited by almost all
ebuilds, mainly for the epatch function. Today, this is often no
longer needed since the package manager provides eapply() in EAPI 6
and later.

So, with introduction of EAPI 7, we had already moved most of the
functions in eutils.eclass to more specific eclasses. The hope back
then was that usage of eutils would further dwindle, and that the
eclass might be kept as a collection of small tools that don't fit
anywhere else.

Looking at the numbers today, I find these numbers of ebuilds
inheriting eutils.eclass:

   37.6 % (3765 of 10013) in EAPI 6
   38.3 % (6334 of 16546) in EAPI 7

Which means that there is no visible reduction. Even worse, of the
6334 ebuilds inheriting eutils in EAPI 7, only 140 actually call any
of its remaining functions.

Presumably many of the above inherits are caused by eutils being
indirectly inherited from other eclasses. Which means that ebuild
maintainers don't have any incentive to act (after all, their ebuilds
_don't_ inherit eutils). OTOH, eclass maintainers don't dare to remove
the eutils inherit, because it could potentially break ebuilds that
rely on indirect inheritance.

I think the only way to get out of this is to phase out eutils.eclass
entirely, by moving its remaining functions to other eclasses, or
deprecate them, as follows:

   edos2unix: split out to new edos2unix.eclass
   make_wrapper: split out to new wrapper.eclass
   strip-linguas: move to l10n.eclass
   emktemp: deprecate (create file in ${T} instead)
   use_in_iuse: deprecate (only used in eclasses, where it can be inlined)

Please review the following series of patches.

(Note that this is to be applied on top of soap's optfeature patch:
https://github.com/gentoo/gentoo/pull/17452)

Ulrich Müller (8):
  eutils.eclass: Specify supported EAPIs.
  edos2unix.eclass: New eclass, split off from eutils.
  wrapper.eclass: New eclass, split off from eutils.
  wrapper.eclass: Do not use emktemp.
  l10n.eclass: Add conditional to prevent multiple inclusion.
  l10n.eclass: strip-linguas() moved from eutils to here.
  eutils.eclass: Deprecate emktemp().
  eutils.eclass: Deprecate use_if_iuse().

 eclass/chromium-2.eclass |   4 +-
 eclass/edos2unix.eclass  |  21 +++++++
 eclass/eutils.eclass     | 128 +++++----------------------------------
 eclass/gnome2.eclass     |   2 +-
 eclass/l10n.eclass       |  54 ++++++++++++++++-
 eclass/mate.eclass       |   4 +-
 eclass/toolchain.eclass  |  77 ++++++++++++-----------
 eclass/wrapper.eclass    |  59 ++++++++++++++++++
 8 files changed, 195 insertions(+), 154 deletions(-)
 create mode 100644 eclass/edos2unix.eclass
 create mode 100644 eclass/wrapper.eclass

-- 
2.28.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-09-12 16:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-10 19:08 [gentoo-dev] [PATCH 0/8] Split off remaining functions from eutils.eclass Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 1/8] eutils.eclass: Specify supported EAPIs Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 2/8] edos2unix.eclass: New eclass, split off from eutils Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 3/8] wrapper.eclass: " Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 4/8] wrapper.eclass: Do not use emktemp Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 5/8] l10n.eclass: Add conditional to prevent multiple inclusion Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 6/8] l10n.eclass: strip-linguas() moved from eutils to here Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 7/8] eutils.eclass: Deprecate emktemp() Ulrich Müller
2020-09-10 19:08 ` [gentoo-dev] [PATCH 8/8] eutils.eclass: Deprecate use_if_iuse() Ulrich Müller
2020-09-12 16:22 ` [gentoo-dev] [PATCH 0/8] Split off remaining functions from eutils.eclass Ulrich Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox