All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Chris Larson <clarson@kergoth.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>,
	openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: EXPORT_FUNCTIONS - change in behaviour proposal
Date: Mon, 10 Dec 2012 17:44:55 +0000	[thread overview]
Message-ID: <1355161495.28775.1.camel@ted> (raw)
In-Reply-To: <CABcZANkOXMWf-v=6uEMgcGhnQZrgfOTDgjtJwarM9NRzGUupug@mail.gmail.com>

On Mon, 2012-12-10 at 10:29 -0700, Chris Larson wrote:
> On Mon, Dec 10, 2012 at 9:09 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>         After Enrico's reported problem, I've been poking around the
>         EXPORT_FUNCTIONS code. Currently OE-Core metadata generates
>         list A
>         below. In particular, this leads to code like:
>         
>          do_configure calls gnomebase_do_configure
>          gnomebase_do_configure calls autotools_do_configure
>         
>         which has a level of indirection. The gnomebase class never
>         references
>         do_configure. I can appreciate adding in a default mapping of:
>         
>          do_configure calls autotools_do_configure
>         
>         since it allows a user to call into autotools_do_configure
>         from a custom
>         do_configure but I can't see the value of the intermediary
>         gnomebase_do_configure. Does anyone know of a use for it?
>         
>         I have a suspicion that if it ever did do anything useful, it
>         stopped
>         being useful long ago.
>         
>         I'm therefore strongly tempted to remove the intermediaries
>         from the
>         code. This would result in list B below which is a more direct
>         set of
>         mappings.
>         
>         Any thoughts/comments from anyone?
>
> In theory, I could see a situation where one class inherits another,
> rather than just individual components all inherited by the recipe.
>
> E.g. in class alpha:
>
> inherit beta
>
> alpha_do_stuff () {
>    pre_stuff
>    beta_do_stuff
>    post_stuff
> }
>
> But this is a theoretical case, and often we hack around things via
> _prepend/_append rather than doing things like this, so I doubt this
> is actually done anywhere in practice.

With an "EXPORT_FUNCTIONS = do_stuff" in alpha.bbclass, wouldn't that
still work without the intermediaries though?

Cheers,

Richard







WARNING: multiple messages have this Message-ID (diff)
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Chris Larson <clarson@kergoth.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>,
	openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [bitbake-devel] EXPORT_FUNCTIONS - change in behaviour proposal
Date: Mon, 10 Dec 2012 17:44:55 +0000	[thread overview]
Message-ID: <1355161495.28775.1.camel@ted> (raw)
In-Reply-To: <CABcZANkOXMWf-v=6uEMgcGhnQZrgfOTDgjtJwarM9NRzGUupug@mail.gmail.com>

On Mon, 2012-12-10 at 10:29 -0700, Chris Larson wrote:
> On Mon, Dec 10, 2012 at 9:09 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>         After Enrico's reported problem, I've been poking around the
>         EXPORT_FUNCTIONS code. Currently OE-Core metadata generates
>         list A
>         below. In particular, this leads to code like:
>         
>          do_configure calls gnomebase_do_configure
>          gnomebase_do_configure calls autotools_do_configure
>         
>         which has a level of indirection. The gnomebase class never
>         references
>         do_configure. I can appreciate adding in a default mapping of:
>         
>          do_configure calls autotools_do_configure
>         
>         since it allows a user to call into autotools_do_configure
>         from a custom
>         do_configure but I can't see the value of the intermediary
>         gnomebase_do_configure. Does anyone know of a use for it?
>         
>         I have a suspicion that if it ever did do anything useful, it
>         stopped
>         being useful long ago.
>         
>         I'm therefore strongly tempted to remove the intermediaries
>         from the
>         code. This would result in list B below which is a more direct
>         set of
>         mappings.
>         
>         Any thoughts/comments from anyone?
>
> In theory, I could see a situation where one class inherits another,
> rather than just individual components all inherited by the recipe.
>
> E.g. in class alpha:
>
> inherit beta
>
> alpha_do_stuff () {
>    pre_stuff
>    beta_do_stuff
>    post_stuff
> }
>
> But this is a theoretical case, and often we hack around things via
> _prepend/_append rather than doing things like this, so I doubt this
> is actually done anywhere in practice.

With an "EXPORT_FUNCTIONS = do_stuff" in alpha.bbclass, wouldn't that
still work without the intermediaries though?

Cheers,

Richard







  reply	other threads:[~2012-12-10 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 16:09 EXPORT_FUNCTIONS - change in behaviour proposal Richard Purdie
2012-12-10 17:29 ` Chris Larson
2012-12-10 17:29   ` [bitbake-devel] " Chris Larson
2012-12-10 17:44   ` Richard Purdie [this message]
2012-12-10 17:44     ` Richard Purdie
2012-12-10 19:41     ` Chris Larson
2012-12-10 19:41       ` [bitbake-devel] " Chris Larson
2012-12-11  0:12       ` Richard Purdie
2012-12-11  0:12         ` [bitbake-devel] " Richard Purdie

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=1355161495.28775.1.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=clarson@kergoth.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.