* [PATCH 1/2] coreutils: Switch to disabling gmp support
2011-03-22 18:21 [PATCH 0/2] coreutils-native and gettext fixes Tom Rini
@ 2011-03-22 18:21 ` 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-23 16:39 ` [PATCH 0/2] coreutils-native and gettext fixes Richard Purdie
2 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2011-03-22 18:21 UTC (permalink / raw)
To: openembedded-core
Coreutils can optionally build with libgmp support and for our uses
it's fine to just not build it rather than add the dependency.
Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
meta/recipes-core/coreutils/coreutils_8.9.bb | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/coreutils/coreutils_8.9.bb b/meta/recipes-core/coreutils/coreutils_8.9.bb
index 4b9a655..d75c080 100644
--- a/meta/recipes-core/coreutils/coreutils_8.9.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.9.bb
@@ -7,9 +7,9 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad"
-PR = "r0"
+PR = "r1"
DEPENDS = "perl-native gmp"
-DEPENDS_virtclass-native = "perl-native gmp-native"
+DEPENDS_virtclass-native = "perl-native"
inherit autotools gettext
@@ -18,6 +18,8 @@ SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.gz"
SRC_URI[md5sum] = "36909ae68840d73a800120cf74af794a"
SRC_URI[sha256sum] = "aa991fa4296b22ff929a31a5cb5528bb783c84cdef4503c4ff311cfbeaebf50a"
+EXTRA_OECONF_virtclass-native = "--without-gmp"
+
# [ gets a special treatment and is not included in this
bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirname du \
env expand expr factor fmt fold groups head hostid id install \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] coreutils: Switch to disabling gmp support
2011-03-22 18:21 ` [PATCH 1/2] coreutils: Switch to disabling gmp support Tom Rini
@ 2011-03-22 18:32 ` Khem Raj
0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-03-22 18:32 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On (22/03/11 11:21), Tom Rini wrote:
> Coreutils can optionally build with libgmp support and for our uses
> it's fine to just not build it rather than add the dependency.
>
To be clear What we lose here is entry for coreutils release notes
* Noteworthy changes in release 7.0 (2008-10-05) [beta]
If the GNU MP library is available at configure time, factor and
expr support arbitrarily large numbers. Pollard's rho algorithm is
used to factor large numbers.
and I think we never intended to use it. Its just that now it finds the
library staged due to gcc requiring it.
Acked-by: Khem Raj <raj.khem@gmail.com>
> Signed-off-by: Tom Rini <tom_rini@mentor.com>
> ---
> meta/recipes-core/coreutils/coreutils_8.9.bb | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/coreutils/coreutils_8.9.bb b/meta/recipes-core/coreutils/coreutils_8.9.bb
> index 4b9a655..d75c080 100644
> --- a/meta/recipes-core/coreutils/coreutils_8.9.bb
> +++ b/meta/recipes-core/coreutils/coreutils_8.9.bb
> @@ -7,9 +7,9 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
> LICENSE = "GPLv3+"
> LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
> file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad"
> -PR = "r0"
> +PR = "r1"
> DEPENDS = "perl-native gmp"
> -DEPENDS_virtclass-native = "perl-native gmp-native"
> +DEPENDS_virtclass-native = "perl-native"
>
> inherit autotools gettext
>
> @@ -18,6 +18,8 @@ SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.gz"
> SRC_URI[md5sum] = "36909ae68840d73a800120cf74af794a"
> SRC_URI[sha256sum] = "aa991fa4296b22ff929a31a5cb5528bb783c84cdef4503c4ff311cfbeaebf50a"
>
> +EXTRA_OECONF_virtclass-native = "--without-gmp"
> +
> # [ gets a special treatment and is not included in this
> bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirname du \
> env expand expr factor fmt fold groups head hostid id install \
> --
> 1.7.0.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
-Khem
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] gettext.bbclass: Fix cases where we lost DEPENDS_GETTEXT
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:21 ` Tom Rini
2011-03-22 18:33 ` Khem Raj
2011-03-23 16:39 ` [PATCH 0/2] coreutils-native and gettext fixes Richard Purdie
2 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2011-03-22 18:21 UTC (permalink / raw)
To: openembedded-core
This is a partial sync-up with 2a9a834ce426f4dc97162870ef1632540ff044f1
of openembedded master. After consulting with Khem there's a few things
that we can do to further improve the situation but doing this fixes
the cases such as BBCLASSEXTEND where we can loose DEPENDS_GETTEXT
and trigger the QA error about missing inherit gettext (when we aren't).
Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
meta/classes/gettext.bbclass | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index a40e74f..45e883f 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -4,7 +4,7 @@ def gettext_after_parse(d):
cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
cfg += " --disable-nls"
depends = bb.data.getVar('DEPENDS', d, 1) or ""
- bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d)
+ bb.data.setVar('DEPENDS', oe_filter_out('^(gettext|gettext-native|virtual/libiconv|virtual/libintl)$', depends, d), d)
bb.data.setVar('EXTRA_OECONF', cfg, d)
python () {
@@ -13,5 +13,9 @@ python () {
DEPENDS_GETTEXT = "gettext gettext-native"
-DEPENDS =+ "${DEPENDS_GETTEXT}"
+DEPENDS_prepend += "${DEPENDS_GETTEXT} "
+DEPENDS_virtclass-native_prepend = "${DEPENDS_GETTEXT} "
+DEPENDS_virtclass-nativesdk_prepend = "${DEPENDS_GETTEXT} "
+DEPENDS_virtclass-cross_prepend = "${DEPENDS_GETTEXT} "
+DEPENDS_virtclass-crosssdk_prepend = "${DEPENDS_GETTEXT} "
EXTRA_OECONF += "--enable-nls"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] gettext.bbclass: Fix cases where we lost DEPENDS_GETTEXT
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
0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-03-22 18:33 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On (22/03/11 11:21), Tom Rini wrote:
> This is a partial sync-up with 2a9a834ce426f4dc97162870ef1632540ff044f1
> of openembedded master. After consulting with Khem there's a few things
> that we can do to further improve the situation but doing this fixes
> the cases such as BBCLASSEXTEND where we can loose DEPENDS_GETTEXT
> and trigger the QA error about missing inherit gettext (when we aren't).
>
> Signed-off-by: Tom Rini <tom_rini@mentor.com>
I think this one needs testing patch looks ok though
> ---
> meta/classes/gettext.bbclass | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
> index a40e74f..45e883f 100644
> --- a/meta/classes/gettext.bbclass
> +++ b/meta/classes/gettext.bbclass
> @@ -4,7 +4,7 @@ def gettext_after_parse(d):
> cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
> cfg += " --disable-nls"
> depends = bb.data.getVar('DEPENDS', d, 1) or ""
> - bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d)
> + bb.data.setVar('DEPENDS', oe_filter_out('^(gettext|gettext-native|virtual/libiconv|virtual/libintl)$', depends, d), d)
> bb.data.setVar('EXTRA_OECONF', cfg, d)
>
> python () {
> @@ -13,5 +13,9 @@ python () {
>
> DEPENDS_GETTEXT = "gettext gettext-native"
>
> -DEPENDS =+ "${DEPENDS_GETTEXT}"
> +DEPENDS_prepend += "${DEPENDS_GETTEXT} "
> +DEPENDS_virtclass-native_prepend = "${DEPENDS_GETTEXT} "
> +DEPENDS_virtclass-nativesdk_prepend = "${DEPENDS_GETTEXT} "
> +DEPENDS_virtclass-cross_prepend = "${DEPENDS_GETTEXT} "
> +DEPENDS_virtclass-crosssdk_prepend = "${DEPENDS_GETTEXT} "
> EXTRA_OECONF += "--enable-nls"
> --
> 1.7.0.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
-Khem
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] coreutils-native and gettext fixes
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:21 ` [PATCH 2/2] gettext.bbclass: Fix cases where we lost DEPENDS_GETTEXT Tom Rini
@ 2011-03-23 16:39 ` Richard Purdie
2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-03-23 16:39 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
^ permalink raw reply [flat|nested] 6+ messages in thread