Subject: Re: Solaris /bin/sh severely broken (once again) (was: Re: Making pkgsrc more robust)
To: None <rillig@NetBSD.org, rmk@rmkhome.com>
From: Gilles Dauphin <Gilles.Dauphin@enst.fr>
List: tech-pkg
Date: 02/08/2006 11:04:17
> From: Rick Kelly <rmk@toad.rmkhome.com>
>
> 
> Roland Illig said:
> 
> >Thanks for noting this. By the way, you forgot to mention that this only 
> >happens on Solaris. With a POSIX shell, this code works perfectly. :)
> >
> >I fixed it by replacing the code with this:
> >
> >if (cd "$dbdir" 1>/dev/null 2>&1); then
> >     cd "$dbdir"
> >
> >This will make the subshell return an error code, and in case the 
> >subshell could change the directory, the parent shell is very likely to 
> >be able to do the same.
> 
> Or you could just have Sun use /usr/xpg4/bin/sh, which is a POSIX shell.
>

but :

[root@redhot 1026] head pre-build
#!/bin/sh
# $NetBSD: pre-build,v 1.56 2005/12/08 21:21:15 rillig Exp $
#

and use the Sun shell.

Gilles