]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
coreutils_9.7.bb: fix update-alternative support for base32
authorKeerthivasan Raghavan <kraghava@qti.qualcomm.com>
Mon, 1 Sep 2025 05:10:41 +0000 (10:40 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Sep 2025 10:40:06 +0000 (11:40 +0100)
base32 is listed as update-alternative binary but does not
set the alternatie variables for it to take effect causing
the original ELF file to be installed in the destination
instead of the symlink. Fix this by setting the alternative
variables and by moving the original binary into subdir.

Signed-off-by: Keerthivasan Raghavan <kraghava@qti.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/coreutils/coreutils_9.7.bb

index 5a6456d65eebe8ff1757c8000fa22cc1966af356..3658f7100cd7e291b1720529b153b9d5bc61f8ca 100644 (file)
@@ -90,7 +90,7 @@ do_install:class-native() {
 }
 
 do_install:append() {
-       for i in df mktemp nice printenv base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
+       for i in df mktemp nice printenv base32 base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
 
        install -d ${D}${base_bindir}
        [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
@@ -110,10 +110,14 @@ ALTERNATIVE_PRIORITY = "100"
 # Make hostname's priority higher than busybox but lower than net-tools
 ALTERNATIVE_PRIORITY[hostname] = "90"
 ALTERNATIVE:${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base32 base64 nice printenv mktemp df"
-ALTERNATIVE:${PN}-doc = "base64.1 nice.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
+ALTERNATIVE:${PN}-doc = "base32.1 base64.1 nice.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
 
 ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
 
+ALTERNATIVE_LINK_NAME[base32] = "${base_bindir}/base32"
+ALTERNATIVE_TARGET[base32] = "${bindir}/base32.${BPN}"
+ALTERNATIVE_LINK_NAME[base32.1] = "${mandir}/man1/base32.1"
+
 ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
 ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
 ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"