[Q] [master][openwrt-21.02] Check on 'which' in include/prereq-build.mk fails for Fedora 34 since recently, how to fix?
David Adair
djabhead at aol.com
Fri May 14 21:10:05 PDT 2021
Barely a hint but I think the issue is related to
-_shell="$(basename $SHELL)"
+which_shell="$(cat /proc/$$/comm)"
Interacting with
SHELL:=sh
Seems like SetupHostCommand wants to find an actual command
which works for sh but not the other shells.
$ which which | grep which
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions
--show-tilde --show-dot'
/usr/bin/which
$ sh -c "which which | grep which"
/usr/bin/which
Perhaps one or more of these as alternative commands to try if the first fails ?
which --skip-alias --skip-functions which | grep which
${SHELL} -c "which which | grep which"
which which | grep which | grep -v alias
which which | grep which | tail -1
e.g.
$(eval $(call SetupHostCommand,which,Please install 'which', \
which which | grep which, \
which --skip-alias --skip-functions which | grep which))
Not so sure though since there are several other uses of "which" in prereq.mk.
It would be safer if you could find a way to stop your system from using the alias.
More information about the openwrt-devel
mailing list