On 06/10/08, Mike.Sullivan at Sun.COM wrote:
> >From Raymond.Xiong at sun.com Mon Jun 9 19:52:45 2008
>
> >In this case, I guess it only checks if there are some special files
> >under HOME dir(I asked this on Erlang mailing list, but unfortunately
> >didn't get helpful answer).
>
> You might want to truss it to see what it really does, or see what
> it leaves, if anything, in an empty directory you set HOME to.
I have done some experiments and I believe in this scenario HOME
directory is not really used at all(I created a zfs fs, set it as
HOME dir, then use fsstat to monitor access to this fs while building
erlang. I observed no access(even LOOKUP)).
While I investigated this issue, I noticed many applications on SFW
gate uses /tmp directory as temporary dir silently:
$ cd $CODEMGR_WS/usr/src/cmd
$ find . -name "Makefile*" | xargs grep "TMP.*tmp"
I would think that is more likely to block(or cause issues in )
parallel builds, although I understand this is not something we
can control.
For those reasons, I decide to keep the original code(using /tmp
as HOME).
> >The reason why I asked this is that I thought it would be better
> >if HOME could be set in env files used by nightly, rather than in
> >each application subdir.
>
> So rather than having it setup in each Makefile.sfw, where it
> would just work and nobody has to care about it, you think everyone
> doing builds should have to go update their env files after your
> putback to set HOME to something? Don't you think that's a bit much to
> ask everyone else to do? That's even assuming it doesn't harm anything under
> HOME too.
Sorry I didn't make it clear. What I meant was to put it in bldenv
(I suppose nightly can access varibles defined in bldenv).
if [[ -z $HOME ]]; then
# set HOME to temp dir
fi
--
Regards,
Raymond