Issue 1439538: test -e is not portable (Solaris 2.7) (original) (raw)

Issue1439538

Created on 2006-02-27 10:51 by havatv, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg27624 - (view) Author: HÃ¥vard Tveite (havatv) Date: 2006-02-27 10:51
I was adviced by Barry Warsaw to file a bug on this. I tried to install Python 2.4.2 (and 2.3.5) on Solaris 2.7, but configure failed. The Solaris 2.7 sh does not support "test -e". "test -e" is used two times in configure. The use of "test -e" is not recommended for "Portable Shell Programming": <URL: http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoconf_10.html > I replaced "test -e" with "test -r", and it seems to work (configure finishes OK, and the files are found), but I do not know if this is the correct way to do it.
msg27625 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-07-24 13:49
Logged In: YES user_id=849994 Martin, is the replacement correct?
msg27626 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-07-30 14:12
Logged In: YES user_id=21627 test -r seems to be the portable way, although it tests for a slightly different property (read access, instead of mere file presence). For autoconf, the best way is to use AC_CHECK_FILE, which then expands to test -r. Fixed in r50982 and r50983.
History
Date User Action Args
2022-04-11 14:56:15 admin set github: 42951
2006-02-27 10:51:24 havatv create