[2/2] glibc-utils: Use update-alternatives for iconv and getconf

Submitted by Khem Raj on Sept. 1, 2020, 4:56 a.m. | Patch ID: 175857


Message ID 20200901045630.1753967-2-raj.khem@gmail.com
State Master Next
Commit 77a538b40ec58f1f2abee353328349cb3c6fc217
Headers show

Commit Message

Khem Raj Sept. 1, 2020, 4:56 a.m.
iconv/getconf utilities can be provided by other packages e.g. toybox,
therefore this adjusts the policy to accomodate images containing
glibc-utils + toybox

ignoring build-deps in build QA helps to avoid build time QA where it
complains about missing dep for rdep which is added by
update-alternatives bbclass, This will not fail a build since we use
update-alternatives-native during build, and at runtime if we are using
u-a then it will be built and added by image and also other packages
using u-a

Signed-off-by: Khem Raj <raj.khem@gmail.com>
 meta/recipes-core/glibc/glibc-package.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 5f1ab60dc6..04fa3dc602 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -65,7 +65,7 @@  DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, loc
 DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
 DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-inherit multilib_header
+inherit multilib_header update-alternatives
 do_install() {
 	oe_runmake install_root=${D} install
@@ -284,3 +284,10 @@  CONFFILES_nscd="${sysconfdir}/nscd.conf"
 SYSTEMD_SERVICE_nscd = "nscd.service"
+ALTERNATIVE_${PN}-utils = "getconf iconv"
+ALTERNATIVE_LINK_NAME[getconf] = "${bindir}/getconf"
+ALTERNATIVE_LINK_NAME[iconv] = "${bindir}/iconv"
+INSANE_SKIP_${PN}-utils += "build-deps"