tests/runtestfedabipkgdiffpy3.sh.in: Don't use which to find python3
Commit Message
From: Mark Wielaard <mark@klomp.org>
which isn't really portable and some distros are removing it from
their base set of packages. https://lwn.net/Articles/874049/
command -v is POSIX and always available in a POSIX shell (like bash).
* tests/runtestfedabipkgdiffpy3.sh.in: Replace which with
command -v.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
tests/runtestfedabipkgdiffpy3.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello,
"Mark J. Wielaard" <mark@klomp.org> a écrit:
> From: Mark Wielaard <mark@klomp.org>
>
> which isn't really portable and some distros are removing it from
> their base set of packages. https://lwn.net/Articles/874049/
Whoah, thank you for the reference. This is some interesting whichcraft
reading.
> command -v is POSIX and always available in a POSIX shell (like bash).
I didn't even know about 'command -v'. Thanks for the pointer.
>
> * tests/runtestfedabipkgdiffpy3.sh.in: Replace which with
> command -v.
>
> Signed-off-by: Mark Wielaard <mark@klomp.org>
Applied to the mainline.
Many thanks.
[...]
Cheers,
@@ -8,7 +8,7 @@
PY3_TEMP=$(mktemp -d --tmpdir libabigail-py3-temp-XXXXXXXX)
-ln -s $(which @PYTHON3_INTERPRETER@) $PY3_TEMP/python
+ln -s $(command -v @PYTHON3_INTERPRETER@) $PY3_TEMP/python
export PATH=$PY3_TEMP:$PATH