[Shipwright] more problems with shipwright-*-wrapper on solaris

sunnavy sunnavy at bestpractical.com
Wed Jun 30 20:44:37 EDT 2010


thanks, applied in ec1ba4fa, which will be included in 2.4.15

best wishes
sunnavy
On 10-06-30 15:50, Andrew Cobaugh wrote:
> On Wed, Jun 30, 2010 at 3:34 PM, Andy Cobaugh <phalenor at gmail.com> wrote:
> >
> > 2 problems:
> >
> > 1) This line doesn't populate LINK as expected:
> >
> >    test -h $0 && LINK=`ls -l $0 | awk -F\>  '{print $NF}'
> >
> > it ends up with a space in fron, like this
> >
> >    " ../etc/shipwright-script-wrapper"
> >
> > which of course breaks things further down. To fix this, I've done something
> > like this:
> >
> >    test -h $0 && LINK=`ls -l $0 | awk -F\>  '{print $NF}' | sed -e 's/^ //'`
> >
> > What I did when we originally saw this on our current installation was use
> > the readlink provided with in /opt/sfw, but we can't rely on /opt/sfw
> > (provided by the Solaris Companion CD) to exist in the general case.
> >
> > 2) With 'real' /bin/sh, variables must be export'd in order for
> > sub-processes to see them, so something like this won't work on solaris:
> >
> >    PERL5LIB=foo ./myProgram.pl
> >
> > As a result, solaris doesn't get the correct PERL5LIB set up for it, among
> > other things. To fix this, I've made the env variable declarations on
> > separate lines, with a final export line, like this:
> >
> >    export PATH PERL5LIB LD_LIBRARY_PATH DYLD_LIBRARY_PATH
> >
> > followed by the exec line.
> 
> Actually, I misspoke. The problem is the exec builtin. /bin/sh's exec
> on solaris must create a completely new environment, whereas bash
> probably copies the environment from the calling process. Either way,
> the fix is simply to export those variables.
> 
> --andy
> _______________________________________________
> Shipwright mailing list
> Shipwright at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/shipwright


More information about the Shipwright mailing list