Patchwork [CONSOLIDATED,PULL,053/113] eglibc: Only add eglibc-utils to PACKAGES if wchar is supported

login
register
mail settings
Submitter Saul Wold
Date Jan. 3, 2012, 6:19 a.m.
Message ID <8c603e5fe18d1bc4c10bf10662caaaa0ac5aa335.1325571069.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/18071/
State New
Headers show

Comments

Saul Wold - Jan. 3, 2012, 6:19 a.m.
From: Darren Hart <dvhart@linux.intel.com>

eglibc-utils RDEPENDS on bash which requires gettext which requires
wchar support. If wchar support is not included in DISTRO_FEATURES,
gettext will fail to compile.

By removing eglibc-utils from the PACKAGES listing, bitbake doesn't
try to build the dependency chain.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/recipes-core/eglibc/eglibc-package.inc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Phil Blundell - Jan. 3, 2012, 11:41 a.m.
On Mon, 2012-01-02 at 22:19 -0800, Saul Wold wrote:
> -PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} ${PN}-utils eglibc-extra-nss${PKGSUFFIX} eglibc-thread-db${PKGSUFFIX} ${PN}-pic ${PN}-dev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
> +PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} eglibc-extra-nss${PKGSUFFIX} eglibc-thread-db${PKGSUFFIX} ${PN}-pic ${PN}-dev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
> +
> +# eglibc-utils rdepends on bash which depends on gettext which requires wchar
> +# support. Only include it in the PACKAGES list if we can build the RDEPENDS.
> +PACKAGES += ${@base_contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', '${PN}-utils', '', d)}

This doesn't seem like a very good fix to the problem at hand.

If I remember right, eglibc-utils includes a whole pile of binaries and
scripts and only one or two of them (mtrace?) require bash.  Knocking
eglibc-utils out of PACKAGES altogether will obviously break anything
which was depending on one of the other binaries in that package.  

Also, unless you take other steps which you don't appear to be, you'll
either get a bunch of extra "unshipped" warnings for the binaries that
no longer have any package, or (depending on how the FILES are
structured) they will soak into one of the other output packages.
Neither of those is particularly desirable.

In decreasing order of preference I think the best ways to deal with
this would be:

a) remove the bash-specific scripting constructs and change the
dependency to plain sh; or

b) fix gettext to not require wchar support; or

c) patch bash to be buildable without gettext; or

d) remove just the specific, troublesome scripts from eglibc-utils when
wchar is not available

Out of interest, how much do you actually gain by disabling
posix-clang-wchar?

p.

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 020f558..ab62654 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -20,7 +20,11 @@  USE_LDCONFIG ?= "1"
 PKGSUFFIX = ""
 PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
 
-PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} ${PN}-utils eglibc-extra-nss${PKGSUFFIX} eglibc-thread-db${PKGSUFFIX} ${PN}-pic ${PN}-dev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
+PACKAGES = "${PN}-dbg ${PN} catchsegv${PKGSUFFIX} sln${PKGSUFFIX} nscd${PKGSUFFIX} ldd${PKGSUFFIX} eglibc-extra-nss${PKGSUFFIX} eglibc-thread-db${PKGSUFFIX} ${PN}-pic ${PN}-dev ${PN}-doc libcidn${PKGSUFFIX} libmemusage${PKGSUFFIX} libsegfault${PKGSUFFIX} ${PN}-pcprofile libsotruss${PKGSUFFIX}"
+
+# eglibc-utils rdepends on bash which depends on gettext which requires wchar
+# support. Only include it in the PACKAGES list if we can build the RDEPENDS.
+PACKAGES += ${@base_contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', '${PN}-utils', '', d)}
 
 # The ld.so in this eglibc supports the GNU_HASH
 RPROVIDES_${PN} = "glibc${PKGSUFFIX} rtld(GNU_HASH)"