public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review
Date: Mon, 19 Oct 2015 09:51:20 -0400	[thread overview]
Message-ID: <CAGfcS_=-YzAqfe5AiV6N1xh+731N195arnz2gARYN51tK-KKUA@mail.gmail.com> (raw)
In-Reply-To: <20151019153447.7d4ea655@gentoo.org>

(To avoid repeating the same exception over and over, please
understand that nothing said below is intended to apply to the
do-everything eclasses used by KDE/etc, where the eclass and ebuilds
are carefully maintained in conjunction with each other.)

On Mon, Oct 19, 2015 at 9:34 AM, Alexis Ballier <aballier@gentoo.org> wrote:
>
> However, by somewhat throwing away the problem, you're just asking for
> a complete mess

The intent of the next paragraph was to not throw away the problem.

>
>> I'd say the best approach for compatibility if you have an existing
>> eclass and it already exports src_prepare is to not call eapply_user
>> unless it firmly falls into the #2 category above.
>
> Replace 'not call eapply_user' by 'not export src_prepare' and I'd
> agree with you if going a bit further by ensuring there is no hidden
> problem:

Well, taken together my recommendation does amount to:
1.  Avoid exporting src_prepare at all.
2.  If you do export src_prepare, then don't call eapply_user.

That means that anybody creating an ebuild that uses an eclass which
does export src_prepare should define the phase in the ebuild, call
the various eclass src_prepares in the appropriate orders, and call
eapply_user in the appropriate place.  Since the ebuild needs to be
modified to use EAPI6 it can be done at that time.

> Going through each eclass exporting src_prepare and defining
> which should export it and which should not. I hope what you say is
> sufficient, but it'd be a bad idea to set this in stone for realizing
> in a few months that this forces people to write crappy code for having
> some eclasses to co-exist nicely.

You already need to write crappy code to get some eclasses to co-exist
nicely, because they export conflicting phase functions assuming
they're the only eclass you'll use.

The eclass docs already indicate which ones export src_prepare.  If
you're using one of those you need to make sure you're overriding it,
and calling eapply_user.  As long as eclasses don't call eapply_user
we're fine.

>
> Some temptative list of which could be annoying (as in, do not seem to
> be 'do everything' eclasses):
>
> bzr.eclass
>   -> patches (now useless) and bootstrap script, dropping it might
>   encounter some resistance
> cuda.eclass
>   -> appends cflags, could easily be moved to src_configure and not
>   exported
> java-pkg-opt-2.eclass
>   -> sanity checks & autofixing, not sure how to handle
> subversion.eclass
>   -> patches (now useless) and bootstrap script, dropping it might
>   encounter some resistance
> vala.eclass
>   -> sets up some kind of virtual env, could very well be src_configure

The solution to these kinds of problems isn't to remove functionality
from the eclass, but rather just export a function that ebuilds can
call from src_prepare at the appropriate time, rather than just trying
to do it all magically.

This was discussed fairly extensively at:
http://article.gmane.org/gmane.linux.gentoo.devel/92581

I'm not attempting to tackle that now, but as a step in the right
direction I suggest that eclasses not try to call eapply_user in
general, and then we don't have to worry about the situation where you
want to use three eclasses which all try to call it.

I think the long-term solution is to stop exporting phase functions in
eclasses.  I'd recommend stripping the ability to do so at all from
PMS, except for the whole KDE exception which makes sense to me.

-- 
Rich


  reply	other threads:[~2015-10-19 13:51 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22049.17676.1822.986579@a1i15.kph.uni-mainz.de>
2015-10-17 12:19 ` [gentoo-dev] Re: [gentoo-dev-announce] EAPI 6 draft for review Jason A. Donenfeld
2015-10-17 12:21   ` Jason A. Donenfeld
2015-10-17 12:24   ` Michał Górny
2015-10-17 12:28     ` hasufell
2015-10-17 12:52       ` Ulrich Mueller
2015-10-17 12:56         ` hasufell
2015-10-17 13:07           ` Ulrich Mueller
2015-10-17 15:22             ` hasufell
2015-10-17 16:40               ` Alexis Ballier
2015-10-17 22:16         ` Rich Freeman
2015-10-18  8:33           ` Alexis Ballier
2015-10-18  9:54           ` Ulrich Mueller
2015-10-18  9:56             ` Alexis Ballier
2015-10-18 10:13             ` Michał Górny
2015-10-18 10:17               ` Ulrich Mueller
2015-10-18 10:49                 ` Rich Freeman
2015-10-19  7:12                 ` Alexis Ballier
2015-10-19  7:22                   ` Anthony G. Basile
2015-10-19  7:28                     ` Alexis Ballier
2015-10-19  8:25                     ` Ulrich Mueller
2015-10-19  8:31                       ` Alexis Ballier
2015-10-19  7:58                   ` Michał Górny
2015-10-19  8:04                     ` Alexis Ballier
2015-10-19  8:09                       ` Michał Górny
2015-10-19  8:17                         ` Alexis Ballier
2015-10-19  8:07                     ` Anthony G. Basile
2015-10-19 22:07                     ` Andreas K. Huettel
2015-10-19 12:38                   ` Rich Freeman
2015-10-19 13:34                     ` Alexis Ballier
2015-10-19 13:51                       ` Rich Freeman [this message]
2015-10-19 14:21                         ` Alexis Ballier
2015-10-19 17:17                           ` Rich Freeman
2015-10-19 18:28                             ` Alexis Ballier
2015-10-19 19:49                               ` Rich Freeman
2015-10-20  7:51                                 ` Alexis Ballier
2015-10-20  8:57                                   ` Rich Freeman
2015-10-20  9:22                                     ` Alexis Ballier
2015-10-20 10:00                                       ` Rich Freeman
2015-10-20 10:25                                         ` Alexis Ballier
2015-10-21  1:24                                           ` Duncan
2015-10-21  7:29                                             ` Alexis Ballier
2015-10-18 10:36             ` Alexis Ballier
2015-10-20  7:47         ` Daniel Campbell
2015-10-20  8:00           ` Alexis Ballier
2015-10-17 12:42     ` Ulrich Mueller
2015-10-17 12:25   ` hasufell
2015-10-17 12:38     ` Rich Freeman
2015-10-17 12:49       ` hasufell
2015-10-17 12:56         ` Rich Freeman
2015-10-17 13:02           ` hasufell
2015-10-17 13:47         ` Alexis Ballier
2015-10-17 15:00           ` hasufell
2015-10-17 16:07             ` Anthony G. Basile
2015-10-17 16:35               ` Alexis Ballier
2015-10-17 18:03         ` Ciaran McCreesh
2015-10-18 11:37           ` hasufell
2015-10-18 11:43             ` Rich Freeman
2015-10-18 12:05               ` hasufell
2015-10-18 12:24                 ` Rich Freeman
2015-10-17 12:51       ` Michał Górny
2015-10-17 19:15         ` Rich Freeman
2015-10-17 20:08 ` Alexis Ballier
2015-10-17 20:47   ` Ulrich Mueller
2015-10-18  8:31     ` Alexis Ballier
2015-10-18  8:48       ` Michał Górny
2015-10-18  9:23         ` Alexis Ballier
2015-10-18 10:07           ` Michał Górny
2015-10-18 10:34             ` Alexis Ballier
2015-10-18 11:54           ` Andreas K. Huettel
2015-10-18 11:57             ` Alexis Ballier
2015-10-18 12:44       ` Ciaran McCreesh
2015-10-18 13:01         ` Rich Freeman
2015-10-18 18:00         ` Alexis Ballier
2015-10-18 18:06           ` Ciaran McCreesh
2015-10-18 18:19             ` Alexis Ballier
2015-10-18 18:36               ` Ciaran McCreesh
2015-10-18 19:20                 ` Alexis Ballier
2015-10-17 21:24   ` Michał Górny
2015-10-18  8:47     ` Alexis Ballier
2015-10-18  9:01       ` Michał Górny
2015-10-18  9:34         ` Alexis Ballier
2015-10-18 10:09           ` Michał Górny
2015-10-18 10:31             ` Alexis Ballier
2015-10-20 18:55 ` [gentoo-dev] utilizing BASH_COMPAT to smooth upgrades Mike Frysinger
2015-10-20 22:03   ` Ulrich Mueller
2015-10-20 22:51     ` Mike Frysinger
2015-10-21  7:34       ` [gentoo-dev] [PATCH] Recommend setting the bash compatibility level. (was: Re: utilizing BASH_COMPAT to smooth upgrades) Ulrich Mueller
2015-10-22 13:55         ` [gentoo-dev] " Mike Frysinger
2015-10-22 15:00           ` Ulrich Mueller
2015-10-22 15:21             ` Mike Frysinger

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='CAGfcS_=-YzAqfe5AiV6N1xh+731N195arnz2gARYN51tK-KKUA@mail.gmail.com' \
    --to=rich0@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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