public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: William Hubbs <williamh@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] rfc: calling all eclass phase functions by default
Date: Sat, 16 Aug 2014 18:01:08 -0500	[thread overview]
Message-ID: <20140816230108.GA11181@linux1> (raw)
In-Reply-To: <CAATnKFB4E3UrQgeRvi5h0N0tXkhUT8mR3Yk56t2hiy9afojqCQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

On Sun, Aug 17, 2014 at 10:32:14AM +1200, Kent Fredric wrote:
> On 17 August 2014 09:54, William Hubbs <williamh@gentoo.org> wrote:
> > My counter proposal to this is that we stop calling eclass phase
> > functions automatically, and to minimize the amount of boilerplating
> >   we would have to do, we use a variable, such as ECLASS_PHASES  which
> >   would be defined at the ebuild level and contain a list of the eclass
> >   phase functions we want to run automatically.
>
> This proposal, seems reasonable, given my comments. I anticipate however
> its biggest downside would be
> the requirement to state *all* the functions you want, which would lead to
> maintenance headaches
> due to people forgetting to declare they wanted some function or other.
> 
> So if you could sculpt it to be broader by default and have less scope for
> developer error, that'd be an improvement.
> 
> --- code start --
> ECLASS_EXCLUDE="foo_src_unpack bar_src_unpack"
> inherit foo bar baz
> 
> 
> --- code end ---
> 
> here, src_unpack would be baz_src_unpack *regardless* of composition order
> because "foo" and "bar" were barred from being used, and baz took
> precedence as a result.
> 
> If baz provides no src_unpack, then the ebuild in question is simply left
> without one.

My concern about reverse logic like excludes is this:

-- code start --

# foo and bas provide src_unpack, but you don't want the PMS default
# src_unpack to run them, and bar does not provide src_unpack:
# You want the rest of the PMS default src_unpack actions to run, so you
# don't write src_unpack.

ECLASS_EXCLUDE="foo_src_unpack bas_src_unpack"
inherit foo bar bas

-- code stop --

This works fine until the eclass maintainer for bar.eclass decides to
add bar_src_unpack.

As soon as that happens, your ebuild is broken.

William


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2014-08-16 23:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16 21:54 [gentoo-dev] rfc: calling all eclass phase functions by default William Hubbs
2014-08-16 22:32 ` Kent Fredric
2014-08-16 23:01   ` William Hubbs [this message]
2014-08-17  3:11     ` [gentoo-dev] " Duncan
2014-08-17  7:03   ` [gentoo-dev] " Michał Górny
2014-08-17  8:49     ` Kent Fredric
2014-08-17  7:06   ` "Paweł Hajdan, Jr."
2014-08-17  7:18     ` Michał Górny
2014-08-17  7:23       ` "Paweł Hajdan, Jr."
2014-08-16 22:54 ` Michał Górny
2014-08-16 23:30   ` William Hubbs
2014-08-17  6:54 ` Ulrich Mueller
2014-08-17 12:24   ` Rich Freeman
2014-08-18  8:54 ` Sergey Popov
2014-08-18 10:44   ` Rich Freeman
2014-08-18 12:21     ` Sergey Popov
2014-08-18 13:27       ` Rich Freeman
2014-08-18 12:04   ` hasufell
2014-08-18 12:19     ` Sergey Popov
2014-08-18 12:30       ` hasufell
2014-08-18 12:41         ` hasufell
2014-08-18 12:52           ` Michał Górny
2014-08-18 12:56           ` hasufell
2014-08-18 13:22             ` Chris Reffett
2014-08-18 13:27               ` hasufell
2014-08-18 15:11               ` Michał Górny
2014-08-18 19:37                 ` Chris Reffett
2014-08-18 20:08                   ` Michał Górny
2014-08-18 20:23                   ` hasufell
2014-08-19  7:02                     ` Sergey Popov
2014-08-18 14:13             ` Rich Freeman
2014-08-19  6:58             ` Sergey Popov

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=20140816230108.GA11181@linux1 \
    --to=williamh@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