@@ -1,18 +1,19 @@
# shellcheck shell=sh
# Initialization script for bash, sh, mksh and ksh
-_declare="declare -f"
-_opt="-f"
-_shell="$(basename $SHELL)"
+which_declare="declare -f"
+which_opt="-f"
+which_shell="$(cat /proc/$$/comm)"
-if [ "$_shell" = "ksh" ] || [ "$_shell" = "mksh" ] || [ "$_shell" =
"zsh" ] ; then
- _declare="typeset -f"
- _opt=""
+if [ "$which_shell" = "ksh" ] || [ "$which_shell" = "mksh" ] || [
"$which_shell" = "zsh" ] ; then
+ which_declare="typeset -f"
+ which_opt=""
fi
which ()
{
-(alias; eval ${_declare}) | /usr/bin/which --tty-only --read-alias
--read-functions --show-tilde --show-dot "$@"
+(alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias
--read-functions --show-tilde --show-dot "$@"
}
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. tldr; A recent upgrade of the which package on Fedora 34 broke the test in OpenWRT on 'which' being installed on the host. I would love to send a patch, but my question is how to fix this? Any ideas welcome! Regards, Bas. I ran into the following: $ ./scripst/feeds update -a (...) Checking 'rsync'... ok. Checking 'which'... failed. Checking 'ldconfig-stub'... ok. Build dependency: Please install 'which' (...) $ rpm -qa which which-2.21-26.fc34.x86_64 I noticed that file /etc/profile.d/which2.sh had changed recently. So I downloaded previous version of the package and extracted said file. Sourced the old file and ran update again: $ . ~/Downloads/which2.sh $ ./scripts/feeds update (...) Checking 'rsync'... ok. Checking 'which'... ok. Checking 'ldconfig-stub'... ok. (...) The relevant part in include/prereq-build.mk is: $(eval $(call SetupHostCommand,which,Please install 'which', \ which which | grep which)) The difference between the two versions of which2.sh is: $ diff -u ~/Downloads/which2.sh /etc/profile.d/which2.sh -export ${_opt} which +export which_declare +export ${which_opt} which I don't see why this breaks the check. The difference is mainly in renaming the variables used. As said, any hint welcome! Regards, Bas.