From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 02/46] classes: Use virtual/libintl instead of gettext
Date: Mon, 04 Apr 2011 12:43:23 +0100 [thread overview]
Message-ID: <1301917403.24596.335.camel@rex> (raw)
In-Reply-To: <9778c2218ffe94c96e816b203ded8569b19a1faf.1301631488.git.raj.khem@gmail.com>
Hi Khem,
I have some comments about this patch.
On Thu, 2011-03-31 at 21:28 -0700, Khem Raj wrote:
> uclibc can use a proxy-libintl to provide dummy
> gettext functionality so we need to make sure
> we operate on virtual/libintl
>
> gettext class is fixed so we can always use
> inherit gettext to create proper dependencies
> on gettext
>
> insane class check for virtual/libintl and
> error message is enhanced to print out gettext
> package name it reports. Code is rearranged
> for cosmetics.
Can you try and split things into units of logical changes please? There
are several separate things this patch is doing and whilst I can
separate them out in my mind, it does make the patch harder to review.
In particular, some of this is a cosmetic change and those should always
be separate.
As an example of the opposite problem, sending 20 patches which change
DEPENDS = "gettext" to "inherit gettext" isn't especially useful and we
could do that as one patch.
The explanation above of "gettext class is fixed so we can always use
inherit gettext to create proper dependencies on gettext" doesn't really
explain anything about what the problem is or how its being fixed.
Instead something like:
* Change gettext.bbclass to use virtual/libintl instead of the
hardcoded gettext dependency
* Ensure gettext and gettext-native are removed from DEPENDS
* Use _append instead of =+ to ensure dependencies are always added
correctly as in some cases += will get overwritten by other overrides.
gives much more information about what is changing and why.
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/classes/autotools.bbclass | 8 +++++++-
> meta/classes/gettext.bbclass | 8 ++++----
> meta/classes/insane.bbclass | 23 +++++++++++------------
> 3 files changed, 22 insertions(+), 17 deletions(-)
>
> diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
> index bc891f9..c128c39 100644
> --- a/meta/classes/autotools.bbclass
> +++ b/meta/classes/autotools.bbclass
> @@ -134,7 +134,13 @@ autotools_do_configure() {
> echo "no" | glib-gettextize --force --copy
> fi
> else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
> - cp ${STAGING_DATADIR}/gettext/config.rpath ${S}/
> + if ! echo ${EXTRA_OECONF} | grep -q "\-\-disable-nls"; then
> + if [ -e ${STAGING_DATADIR}/gettext/config.rpath ]; then
> + cp ${STAGING_DATADIR}/gettext/config.rpath ${S}/
> + else
> + oenote config.rpath not found in target sysroot. gettext is not staged. Usually happens when building with uclibc
> + fi
> + fi
> fi
This looks likely to cause errors based on my experience if the
dependencies go wrong somehow. Can we make this more explicit about the
three cases we expect (gettext/libintl/disable-nls) and what to do in
each of them. We can then still error if gettext is enabled and that
file isn't present. The error message can then be much more specific too
about what the problem is.
> diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
> index a40e74f..f49b595 100644
> --- a/meta/classes/gettext.bbclass
> +++ b/meta/classes/gettext.bbclass
> @@ -3,15 +3,15 @@ def gettext_after_parse(d):
> if bb.data.getVar('USE_NLS', d, 1) == 'no':
> 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)
> + depends = bb.data.getVar('DEPENDS', d, True) or ""
> + bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl|gettext|gettext-native)$', depends, d), d)
> bb.data.setVar('EXTRA_OECONF', cfg, d)
>
> python () {
> gettext_after_parse(d)
> }
>
> -DEPENDS_GETTEXT = "gettext gettext-native"
> +DEPENDS_GETTEXT = "virtual/libintl gettext-native"
I doubt there should be be a gettext-native here in the uclibc case?
How about simplifying this to:
DEPENDS_GETTEXT = "gettext gettext-native"
DEPENDS_GETTEXT_libc-uclibc = "virtual/libintl"
> -DEPENDS =+ "${DEPENDS_GETTEXT}"
> +DEPENDS_append = " ${DEPENDS_GETTEXT}"
> EXTRA_OECONF += "--enable-nls"
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 8124384..a2bcaae 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -553,10 +553,6 @@ python do_package_qa () {
> bb.note("DONE with PACKAGE QA")
> }
>
> -
> -# The Staging Func, to check all staging
> -#addtask qa_staging after do_populate_sysroot before do_build
> -do_populate_sysroot[postfuncs] += "do_qa_staging "
> python do_qa_staging() {
> bb.note("QA checking staging")
>
> @@ -564,10 +560,6 @@ python do_qa_staging() {
> bb.fatal("QA staging was broken by the package built above")
> }
>
> -# Check broken config.log files, for packages requiring Gettext which don't
> -# have it in DEPENDS and for correct LIC_FILES_CHKSUM
> -#addtask qa_configure after do_configure before do_compile
> -do_configure[postfuncs] += "do_qa_configure "
> python do_qa_configure() {
> configs = []
> workdir = bb.data.getVar('WORKDIR', d, True)
> @@ -585,21 +577,28 @@ Rerun configure task after fixing this. The path was '%s'""" % root)
> if "configure.in" in files:
> configs.append(os.path.join(root, "configure.in"))
>
> - if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True):
> + cnf = bb.data.getVar('EXTRA_OECONF', d, True) or ""
> + if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True) and "--disable-nls" not in cnf:
> if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
> gt = "gettext-native"
> elif bb.data.inherits_class('cross-canadian', d):
> gt = "gettext-nativesdk"
> else:
> - gt = "gettext"
> + gt = "virtual/libintl"
> deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "")
> if gt not in deps:
> for config in configs:
> gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
> if os.system(gnu) == 0:
> - bb.fatal("""Gettext required but not in DEPENDS for file %s.
> -Missing inherit gettext?""" % config)
> + bb.fatal("""%s required but not in DEPENDS for file %s. Missing inherit gettext?""" % (gt, config))
>
> if not package_qa_check_license(workdir, d):
> bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")
> }
> +do_populate_sysroot[postfuncs] += "do_qa_staging "
> +
> +# Check broken config.log files, for packages requiring Gettext which don't
> +# have it in DEPENDS and for correct LIC_FILES_CHKSUM
> +#addtask qa_configure after do_configure before do_compile
> +
> +do_configure[postfuncs] += "do_qa_configure "
next prev parent reply other threads:[~2011-04-04 11:46 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 4:28 [PATCH 00/46] Enhance uclibc support Khem Raj
2011-04-01 4:28 ` [PATCH 01/46] sanity.bbclass: Use SSTATE_MANIFESTS instead of hard coding sstate-control Khem Raj
2011-04-04 11:45 ` Richard Purdie
2011-04-01 4:28 ` [PATCH 02/46] classes: Use virtual/libintl instead of gettext Khem Raj
2011-04-04 11:43 ` Richard Purdie [this message]
2011-04-05 2:38 ` Tom Rini
2011-04-01 4:28 ` [PATCH 03/46] classes: Use linux-uclibceabi instead of linux-uclibgnuceabi for os portion of triplet Khem Raj
2011-04-01 4:28 ` [PATCH 04/46] site: Add mips-linux-uclibc site file and add to x86_64-linux-uclibc Khem Raj
2011-04-01 4:28 ` [PATCH 05/46] conf/distro/poky.conf: Use -uclibceabi instead of -uclibgnuceabi Khem Raj
2011-04-01 4:28 ` [PATCH 06/46] recipes: Use -uclibceabi instead of -uclibcgnueabi Khem Raj
2011-04-04 11:46 ` Richard Purdie
2011-04-01 4:28 ` [PATCH 07/46] libiconv: update from 1.9.2 -> 1.11.1 Khem Raj
2011-04-04 11:45 ` Richard Purdie
2011-04-01 4:28 ` [PATCH 08/46] avahi.inc: Conditionalize RECOMMENDS by using overrides Khem Raj
2011-04-01 4:28 ` [PATCH 09/46] galago: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-01 4:28 ` [PATCH 10/46] telepathy-glib_0.13.6.bb: " Khem Raj
2011-04-01 4:28 ` [PATCH 11/46] console-tools_0.3.2.bb: inherit gettext Khem Raj
2011-04-01 4:28 ` [PATCH 12/46] coreutils_6.9.bb: Remove gettext from DEPENDS Khem Raj
2011-04-01 4:28 ` [PATCH 13/46] gettext_0.17.bb: Use linux-uclibceabi instead of linux-uclibcgnueabi Khem Raj
2011-04-04 11:50 ` Richard Purdie
2011-04-01 4:28 ` [PATCH 14/46] glib-2.0: Inherit gettext should provide right libintl so remove from DEPENDS Khem Raj
2011-04-04 11:52 ` Richard Purdie
2011-04-01 4:28 ` [PATCH 15/46] util-linux.inc: remove virtual/libintl " Khem Raj
2011-04-04 11:57 ` Richard Purdie
2011-04-01 4:28 ` [PATCH 16/46] binutils: Use arm*-*-linux-uclibceabi instead of arm*-*-linux-uclibcgnueabi Khem Raj
2011-04-01 4:29 ` [PATCH 17/46] bison: Make compilable on uclibc Khem Raj
2011-04-01 4:29 ` [PATCH 18/46] diffstat_1.54.bb: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-01 4:29 ` [PATCH 19/46] libpam_1.1.3.bb: Fix compilation on uclibc when innetgr is absent Khem Raj
2011-04-04 11:58 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 20/46] alsa-utils_1.0.23.bb: Remove xmlto requirement Khem Raj
2011-04-04 11:59 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 21/46] liboil_0.3.17.bb: Enable x86_64 unaligned memory access Khem Raj
2011-04-01 4:29 ` [PATCH 22/46] e2fsprogs.inc: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-01 4:29 ` [PATCH 23/46] flex.inc: " Khem Raj
2011-04-04 12:30 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 24/46] elfutils_0.148.bb: Fix compilation issues on uclibc Khem Raj
2011-04-04 12:30 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 25/46] gcc-runtime_4.5.1.bb: Do not filter out -feliminate-dwarf2-dups Khem Raj
2011-04-04 12:36 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 26/46] perl_5.12.2.bb: By defualt undefine features not found in uclibc Khem Raj
2011-04-04 12:36 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 27/46] xorg-proto: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-04 12:36 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 28/46] xorg-lib: " Khem Raj
2011-04-04 12:00 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 29/46] attr: Fix compilation on uclibc Khem Raj
2011-04-04 12:38 ` Richard Purdie
2011-04-01 4:29 ` [PATCH 30/46] sed: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-01 4:29 ` [PATCH 31/46] chkconfig_1.3.49.bb: " Khem Raj
2011-04-01 4:29 ` [PATCH 32/46] libuser_0.57.1.bb: " Khem Raj
2011-04-01 4:29 ` [PATCH 33/46] libzypp_git.bb: " Khem Raj
2011-04-01 4:30 ` [PATCH 34/46] xz_5.0.0.bb: " Khem Raj
2011-04-01 4:30 ` [PATCH 35/46] gdk-pixbuf_2.22.1.bb: " Khem Raj
2011-04-01 4:30 ` [PATCH 36/46] libgdata_0.7.1.bb: " Khem Raj
2011-04-01 4:30 ` [PATCH 37/46] popt_1.16.bb: " Khem Raj
2011-04-01 4:30 ` [PATCH 38/46] libgpg-error: " Khem Raj
2011-04-01 4:30 ` [PATCH 39/46] clutter.inc: " Khem Raj
2011-04-01 4:30 ` [PATCH 40/46] libxcb.inc: Replace XCBPROTO_XCBPYTHONDIR to point to staging area Khem Raj
2011-04-01 4:30 ` [PATCH 41/46] util-macros_1.11.0.bb: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-01 4:30 ` [PATCH 42/46] gstreamer_0.10.31.bb: " Khem Raj
2011-04-01 4:30 ` [PATCH 43/46] gnutls.inc: " Khem Raj
2011-04-01 4:30 ` [PATCH 44/46] libcap.inc: Pass SYSTEM_HEADERS to make Khem Raj
2011-04-01 4:30 ` [PATCH 45/46] libexif_0.6.16.bb: inherit gettext class instead of adding gettext to DEPENDS directly Khem Raj
2011-04-04 12:43 ` Richard Purdie
2011-04-01 4:30 ` [PATCH 46/46] linux-tools.inc: Dummify do_compile_perf and do_install_perf for uclibc Khem Raj
2011-04-03 23:46 ` Khem Raj
2011-04-04 12:49 ` 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=1301917403.24596.335.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