delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/10/11:50:54

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Thorsten Kampe <thorsten AT thorstenkampe DOT de>
Subject: RE: Possible bug: d does not seem to read ~/.d.conf
Date: Fri, 10 Aug 2007 16:48:15 +0100
Lines: 46
Message-ID: <f9i1c0$b4a$4@sea.gmane.org>
References: <387E9FC1619C0849BA8934938037E54F0F5BC9 AT sv-muc-004 DOT venyon-mail DOT local> <46BC5567 DOT 1070307 AT users DOT sourceforge DOT net> <f9hoo4$i21$2 AT sea DOT gmane DOT org> <03e401c7db57$07898840$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <f9hvqq$b4a$2 AT sea DOT gmane DOT org> <040501c7db64$5a133810$2e08a8c0 AT CAM DOT ARTIMI DOT COM>
Mime-Version: 1.0
User-Agent: MicroPlanet-Gravity/2.70.2067
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

* Dave Korn (Fri, 10 Aug 2007 16:37:23 +0100)
> On 10 August 2007 16:22, Thorsten Kampe wrote:
> 
> 
> > The problem (/my/ problem and maybe Ronald's) is that d reads the home
> > directory from /etc/passwd and not from the environment variable
> > $HOME. In my setup these differ.
> 
>   Is that even valid?  Hmmm.  Posix does say:
> 
> http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html
> "  HOME
>     The system shall initialize this variable at the time of login to be a pathname of the user's home directory. See <pwd.h>.  "
> 
> but then again, it also says:
> 
> http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html
> "   3.192 Home Directory
> The directory specified by the HOME environment variable.  "
> 
> and also:
> 
> http://www.opengroup.org/onlinepubs/009695399/utilities/sh.html
> "  HOME
>     Determine the pathname of the user's home directory. The contents of HOME are used in tilde expansion as described in Tilde Expansion. This volume of IEEE Std 1003.1-2001 specifies the effects of this variable only for systems supporting the User Portability Utilities option.  "
> 
> although that last one was revised in Issue 6:
> 
> "  In the ENVIRONMENT VARIABLES section, the text "user's home directory" is updated to "directory referred to by the HOME environment variable".  "
> 
> > In my opinion $HOME should take precedence over the home directory set
> > in /etc/passwd.
> 
>   I think it's kind of ambiguous.  The 'd' man page specifically refers to ".d.conf in the user's home directory", as opposed to "~/.d.conf"; I think those two definitions are allowed to diverge, from what I quoted above.  The spec is unclear: how can you initialise HOME from "the user's home directory", if whatever the user's home directory is is only defined in 
terms of the contents of $HOME, without reference to field #6 in /etc/passwd?  That would be a circular reference to uninitialised data, that would!

Well, if it wasn't valid then there would be no sense to even set 
$HOME, right? Because it would have always point to the same path as 
the entry in /etc/passwd.

Anyway, I'm not doing this for fun but because my home directory is on 
a removable drive and all applications I know honor $HOME (except 
irssi where I had to alias irssi='irssi --home=~ --
config=~/.irssi/config')

Thorsten


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019