[OE-core] [RFC][PATCH] recipes: replace runtime dependency on bash with VIRTUAL-RUNTIME_bash

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Sep 13 15:26:54 UTC 2017


> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org
> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf Of
> Martin Jansa
> Sent: den 13 september 2017 16:49
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [RFC][PATCH] recipes: replace runtime dependency on
> bash with VIRTUAL-RUNTIME_bash
> 
> * this allows to reliably replace bash with e.g. busybox
> * without this change the QA check can find bash as the provider
>   for /bin/bash if you build bash before some other recipe using
>   bash and then QA issue like this is shown:
>   ERROR: QA Issue: foo rdepends on bash, but it isn't a build dependency
>   , missing bash in DEPENDS or PACKAGECONFIG? [build-deps]
>   even when the distro has bash enabled in busybox defconfig and
>   busybox RPROVIDES bash as well as /bin/bash, this is because the QA
>   check (and to some extend also the package-manager) doesn't know which
>   provider is prefered, so if bash isn't built at all in sysroot, it
>   will happily accept busybox as the provider, but when both are built
>   in sysroot, then bash is found first and QA error is shown.
> * more information in:
>   https://bugzilla.yoctoproject.org/show_bug.cgi?id=9217
> 
> Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
> ---
>  meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb                     | 3 ++-
>  meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb          | 3 ++-
>  meta/recipes-connectivity/openssl/openssl_1.1.0f.bb             | 3 ++-
>  meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb         | 3 ++-
>  meta/recipes-core/console-tools/console-tools_0.3.2.bb          | 3 ++-
>  meta/recipes-core/dbus/dbus-test_1.10.20.bb                     | 3 ++-
>  meta/recipes-core/glibc/glibc-scripts.inc                       | 3 ++-
>  meta/recipes-core/systemd/systemd_234.bb                        | 5 +++--
>  meta/recipes-core/util-linux/util-linux.inc                     | 3 ++-
>  meta/recipes-devtools/apt/apt_1.2.24.bb                         | 3 ++-
>  meta/recipes-devtools/build-compare/build-compare_git.bb        | 3 ++-
>  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb             | 3 ++-
>  meta/recipes-devtools/flex/flex_2.6.0.bb                        | 3 ++-
>  meta/recipes-devtools/go/go-dep_0.3.0.bb                        | 3 ++-
>  meta/recipes-devtools/go/go-target.inc                          | 3 ++-
>  meta/recipes-devtools/libtool/libtool_2.4.6.bb                  | 3 ++-
>  meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb              | 3 ++-
>  meta/recipes-devtools/qemu/qemu.inc                             | 3 ++-
>  meta/recipes-devtools/qemu/qemu_2.10.0.bb                       | 3 ++-
>  meta/recipes-devtools/quilt/quilt.inc                           | 5 +++--
>  meta/recipes-devtools/rpm/rpm_git.bb                            | 3 ++-
>  meta/recipes-devtools/tcf-agent/tcf-agent_git.bb                | 3 ++-
>  meta/recipes-extended/hdparm/hdparm_9.52.bb                     | 3 ++-
>  meta/recipes-extended/mdadm/mdadm_4.0.bb                        | 3 ++-
>  meta/recipes-extended/parted/parted_3.2.bb                      | 3 ++-
>  meta/recipes-kernel/dtc/dtc.inc                                 | 3 ++-
>  meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb                  | 3 ++-
>  meta/recipes-kernel/perf/perf.bb                                | 9 +++++----
>  meta/recipes-kernel/systemtap/systemtap_git.bb                  | 3 ++-
>  meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.4.bb        | 3 ++-
>  meta/recipes-support/apr/apr_1.6.2.bb                           | 3 ++-
>  meta/recipes-support/attr/acl_2.2.52.bb                         | 3 ++-
>  meta/recipes-support/source-highlight/source-highlight_3.1.8.bb | 3 ++-
>  33 files changed, 71 insertions(+), 38 deletions(-)
> 
> diff --git a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
> index cac09101c4..d9dcde1aff 100644
> --- a/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
> +++ b/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
> @@ -17,7 +17,8 @@ inherit pkgconfig autotools manpages
> 
>  PACKAGECONFIG[manpages] = "--enable-doc, --disable-doc, libxslt-native xmlto-native"
> 
> -RDEPENDS_${PN} = "grep bash"
> +VIRTUAL-RUNTIME_bash ?= "bash"

Isn't it better to set the default once in 
meta/conf/distro/include/default-providers.inc?

> +RDEPENDS_${PN} = "grep ${VIRTUAL-RUNTIME_bash}"
> 
>  do_configure_prepend () {
>  	( cd ${S}; autoreconf -f -i -s )
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
> index d917c4d713..b0237a72a0 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.1.1.bb
> @@ -9,7 +9,8 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
> 
>  # util-linux for libblkid
>  DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3 libtirpc"
> -RDEPENDS_${PN} = "${PN}-client bash"
> +VIRTUAL-RUNTIME_bash ?= "bash"
> +RDEPENDS_${PN} = "${PN}-client ${VIRTUAL-RUNTIME_bash}"
>  RRECOMMENDS_${PN} = "kernel-module-nfsd"
> 
>  inherit useradd
...

//Peter




More information about the Openembedded-core mailing list