vim do not guess $HOME when unavailable
Bram Moolenaar
Bram at moolenaar.net
Mon Jan 23 22:13:23 UTC 2006
Ciaran McCreesh wrote:
> On Mon, 23 Jan 2006 22:32:20 +0100 Bram Moolenaar <Bram at moolenaar.net>
> wrote:
> | > Although unfortunately, some of the Gnome stuff to which Vim links
> | > ignores $HOME and only uses getpwuid, which means that the Vim build
> | > process has to have write access to the real ~/.gnome2* when
> | > generating the NLS things or running tests...
> |
> | That's weird. I mean, how would you get the result from getpwuid()
> | in a shell script (in a Makefile)?
>
> Vim is invoked via the Makefile for various things, so if you're
> building with --with-vim-name=gvim the Gnome code gets called.
Sorry, I wasn't clear. I meant: If we are supposed to use the directory
that getpwuid() returns, how would you do such a thing in a shell script
or Makefile? The point is that almost everywhere $HOME is used.
> | Also note that "~/.gnome2" is short for "$HOME/.gnome2". At least,
> | that's how I have aways seen it. A simple test confirms it:
>
> Sorry, should've been clearer. I mean that the real (from passwd) home
> directory is used, and the environment variable is ignored.
>
> | Perhaps it's better to consider the Gnome stuff to be the problem...
>
> Probably, yes. I only noticed this because Gentoo builds are done in a
> sandbox that disallows writes outside of the build directory, and the
> usual workaround (setting ${HOME} to a temporary directory) weren't
> working. No big deal, since we can selectively allow writes or just hack
> the Makefile to make a buildvim -> gvim symlink and use that inside the
> Makefile instead...
The suggestion that Gnome is doing something wrong appears to be
supported by this.
--
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.
/// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://www.ICCF.nl ///
More information about the pkg-vim-maintainers
mailing list