File: 0002-autogen.sh-Avoid-debian-buggy-which-output.patch

package info (click to toggle)
mpich 4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,184 kB
  • sloc: ansic: 1,040,629; cpp: 82,270; javascript: 40,763; perl: 27,933; python: 16,041; sh: 14,676; xml: 14,418; f90: 12,916; makefile: 9,270; fortran: 8,046; java: 4,635; asm: 324; ruby: 103; awk: 27; lisp: 19; php: 8; sed: 4
file content (28 lines) | stat: -rw-r--r-- 888 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Boyuan Yang <byang@debian.org>
Date: Fri, 15 Oct 2021 22:51:02 -0400
Subject: autogen.sh: Avoid debian buggy which output

Debian's /usr/bin/which after Debian 11 release starts
printing deprecation warning, which causes configure error
("bash not found") when autogen.sh parses output merging
stdout and stderr using 2>&1.

To circumvent this problem, temporarily replace invocation to
which tool with POSIX-compliant "command -v".

Signed-off-by: Boyuan Yang <byang@debian.org>
---
 autogen.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/autogen.sh
+++ b/autogen.sh
@@ -812,7 +812,7 @@
 
 fn_check_bash_find_patch_xargs() {
     echo_n "Checking for bash... "
-    if test "`which bash 2>&1 > /dev/null ; echo $?`" = "0" ;then
+    if test "`command -v bash 2>&1 > /dev/null ; echo $?`" = "0" ;then
         echo "done"
     else
         echo "bash not found" ;