pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/bootstrap Make sure that the files found by check_prog...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cfb8455b0bd4
branches:  trunk
changeset: 537906:cfb8455b0bd4
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Jan 20 19:55:29 2008 +0000

description:
Make sure that the files found by check_prog are really regular files
and nothing else. This prevents bootstrap from exiting just because
there is a subdirectory named "awk" (or another tool) in one of the PATH
directories.

Fixes PR 37806.

diffstat:

 bootstrap/bootstrap |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r bcf9faed678b -r cfb8455b0bd4 bootstrap/bootstrap
--- a/bootstrap/bootstrap       Sun Jan 20 18:25:27 2008 +0000
+++ b/bootstrap/bootstrap       Sun Jan 20 19:55:29 2008 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.116 2007/11/01 23:18:54 rillig Exp $
+# $NetBSD: bootstrap,v 1.117 2008/01/20 19:55:29 rillig Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -170,7 +170,7 @@
        fi
 
        for _d in `echo $PATH | tr ':' ' '`; do
-               if [ -x "$_d/$_name" ]; then
+               if [ -f "$_d/$_name" ] && [ -x "$_d/$_name" ]; then
                        # Program found
                        eval $_var=\""$_d/$_name"\"
                        return 1



Home | Main Index | Thread Index | Old Index