uutils-coreutils: link base32 base64 df mktemp nice printenv in base_bindir

GNU coreutils installs these in ${base_bindir}, so match it. This only
matters when usrmerge is not enabled, as otherwise ${base_bindir} and
${bindir} are the same directory and the generated links are unchanged.
Only the path of the update-alternatives symlinks changes (from ${bindir}
to ${base_bindir}); they still point to ${bindir}/coreutils.

Checked that the generated postinstall now links all six in /bin.

AI-Generated: Uses Claude Sonnet 5.5
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Etienne Cordonnier authored and Khem Raj committed 2026-10-18 10:09:24 -07:00
1 parent 53c0b99a78
commit f614fcf7d4
1 file changed
+6 -3
@@ -33,7 +33,7 @@ CARGO_BUILD_FLAGS += "--features unix --features feat_external_libstdbuf"
# The code which follows is strongly inspired from the GNU coreutils bitbake recipe:
# df mktemp nice printenv base32 base64 get a special treatment and are not included in this
# df mktemp nice printenv base32 base64 are not included in this, see base_bindir_progs_extra
bindir_progs = "[ arch basename cksum comm csplit cut dir dircolors dirname du \
env expand expr factor fmt fold groups head hostid id install \
join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
@@ -57,13 +57,16 @@ ALTERNATIVE_PRIORITY = "100"
# Higher than net-tools (which uses 100)
ALTERNATIVE_PRIORITY[hostname] = "110"
ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base32 base64 nice printenv mktemp df"
# Like GNU coreutils, these are linked in ${base_bindir} rather than ${bindir}.
base_bindir_progs_extra = "base32 base64 df mktemp nice printenv"
ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${sbindir_progs} ${base_bindir_progs_extra}"
# Use the multicall binary named "coreutils" for symlinks
ALTERNATIVE_TARGET = "${bindir}/coreutils"
python __anonymous() {
for prog in d.getVar('base_bindir_progs').split():
for prog in (d.getVar('base_bindir_progs') + ' ' + d.getVar('base_bindir_progs_extra')).split():
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
for prog in d.getVar('sbindir_progs').split():