Subject: bin/23313: ./ bug fix
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/29/2003 22:10:36
>Number:         23313
>Category:       bin
>Synopsis:       /usr/src/ uses a wrong path as $TOP
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 30 04:11:00 UTC 2003
>Originator:     Kazushi (Jam) Marukawa
>Release:        NetBSD 1.6ZC
System: NetBSD 1.6ZC NetBSD 1.6ZC (sou) #1: Fri Oct 10 09:00:25 CDT 2003 i386
Architecture: i386
Machine: i386
	/usr/src/ is using pwd to get the $TOP path.  However,
	the pwd command of recent /bin/sh is internal command.  It uses
	cached pwd.  This cause problem if user places the source codes
	on different directory and use a symbolic link from /usr/src
	to there.
	Put /usr/src at /mnt/netbsd/src.  Make a symbolic link from /usr/src
	to /mnt/netbsd/src.  Do cd to /usr/src.  Do "./ -U -O /usr/obj
	params".  It doesn't show corrent MAKEOBJDIR.
	Here is a small patch.  I'm not sure I should modify "pwd -P" too.
	So, I just left it as is.

RCS file: /cvsroot/src/,v
retrieving revision 1.122
diff -u -r1.122
---	2003/10/26 03:12:21	1.122
+++	2003/10/30 04:09:30
@@ -90,7 +90,7 @@
 	if [ "${uname_s}" = "SunOS" ]; then
 		TOP=$(pwd -P)
-		TOP=$(pwd)
+		TOP=$(/bin/pwd)
 	# Set defaults.