Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 0/2] coreutils-native and gettext fixes
Date: Wed, 23 Mar 2011 16:39:15 +0000	[thread overview]
Message-ID: <1300898355.3018.26.camel@rex> (raw)
In-Reply-To: <cover.1300817337.git.tom_rini@mentor.com>

On Tue, 2011-03-22 at 11:21 -0700, Tom Rini wrote:
> They following changes do two things.  First up, this re-syncs
> coreutils-native with the changes I just made in openembedded.master
> to opt out of gmp-native rather than DEPEND on it (oe.master had neither
> previously).  The second change was that in testing the above I ran into
> gettext.bbclass + BBCLASSEXTEND breakage that I had fixed in oe.master
> previously.  I've extended what I did slightly to also cover crosssdk
> here.  After talking with Khem there's further cleanups that we can do
> but are separate.
> 
> Pull URL: git://git.openembedded.org/openembedded-core-contrib
>   Branch: trini/misc-fixes
>   Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=trini/misc-fixes
> 
> Thanks,
>     Tom Rini <tom_rini@mentor.com>
> ---
> 
> 
> Tom Rini (2):
>   coreutils: Switch to disabling gmp support
>   gettext.bbclass: Fix cases where we lost DEPENDS_GETTEXT

I've taken the coreutils change, thanks.

For gettext, we chatted on IRC but to summarise:

a) Poky went about addressing the problem slightly differently. Bottom
line is the situation was worked around when DEPENDS_virtclass was used
by manually specifying the gettext dependency.

If we go for a new way to fix this in the class like Tom is proposing,
I'd like to remove the other workaround so we have one clear way of
doing things.

b) This just highlights what a mess changing DEPENDS is at the moment.
Every time we want a virtclass we shouldn't have to add more items to
lists, it just feels wrong. Over time this has all the makings of an
unmaintainable disaster.

The root of the problem is what BBCLASSEXTEND does, or more specifically
the code in native.bbclass which needs to manipulate DEPENDS. There are
the following constraints on DEPENDS:

* Its set in recipes with a "=", i.e. a hard assignment. Ideally it
would be += to append to a core set of dependencies but that isn't the
way it works.

* We add in "core" dependencies such as the toolchain with a
DEPENDS_prepend = "xxx", e.g. from base.bbclass:

DEPENDS_prepend="${@base_dep_prepend(d)} "
DEPENDS_virtclass-native_prepend="${@base_dep_prepend(d)} "
DEPENDS_virtclass-nativesdk_prepend="${@base_dep_prepend(d)} "

This shows one other place where this virtclass workaround has had to be
applied :(.

The problem is that if someone sets:

DEPENDS_virtclass-native = "xxx"

this wipes out the original DEPENDS when you perhaps only wanted to wipe
out the recipe specific dependencies, not the core additional ones.

I don't have any better way to fix this at the moment but it does
highlight an easy solution to improve Tom's patch. We should define this
in base.bbclass:

BASEDEPENDS = "${@base_dep_prepend(d)}"
DEPENDS_prepend="${BASEDEPENDS} "
DEPENDS_virtclass-native_prepend="${BASEDEPENDS} "
DEPENDS_virtclass-nativesdk_prepend="${BASEDEPENDS} "

and then gettext.bbclass should just do:

BASEDEPENDS += "<gettext depenedncies>"

Whilst this is still ugly, its less ugly at least...

Cheers,

Richard







      parent reply	other threads:[~2011-03-23 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 18:21 [PATCH 0/2] coreutils-native and gettext fixes Tom Rini
2011-03-22 18:21 ` [PATCH 1/2] coreutils: Switch to disabling gmp support Tom Rini
2011-03-22 18:32   ` Khem Raj
2011-03-22 18:21 ` [PATCH 2/2] gettext.bbclass: Fix cases where we lost DEPENDS_GETTEXT Tom Rini
2011-03-22 18:33   ` Khem Raj
2011-03-23 16:39 ` Richard Purdie [this message]

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=1300898355.3018.26.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox