Subject: Re: build breaks w/ read-only sources
To: None <current-users@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 10/30/2003 09:26:38
On Thu, Oct 30, 2003 at 08:42:57AM +0000, David Laight wrote:
> >   | The key is pwd.  A "pwd" of our recent /bin/sh is internal
> >   | command and the value is cached.
> > 
> > Have you just tried "TOP=$(pwd -P)" as a replacement for those 5
> > lines?
> 
> Won't help (untill we fix/change /bin/sh).
> The builtin 'pwd' ignores all its arguments.

Having actually looked at the /bin/sh code, implemented -P and -L
and tested it....

Our /bin/sh (unlike ksh) ignores the cached 'pwd' whenever 'cd' crosses a
symlink.  This means it will only get the wrong answer if the current
directory is moved, or if the value of PWD on entry crosses a symlink (it
has to match st_dev and st_ino).

	David

-- 
David Laight: david@l8s.co.uk