delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/09/11/19:40:21

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: mwoehlke <mwoehlke AT tibco DOT com>
Subject: Re: [ANNOUNCEMENT] Updated [experimental]: bash-3.1-7
Date: Mon, 11 Sep 2006 18:39:53 -0500
Lines: 46
Message-ID: <ee4s4a$ibd$1@sea.gmane.org>
References: <announce DOT 45023251 DOT 3060809 AT byu DOT net> <ee48fe$fhd$1 AT sea DOT gmane DOT org> <20060911180903 DOT GA21327 AT trixie DOT casa DOT cgf DOT cx> <ee4a4b$luj$1 AT sea DOT gmane DOT org> <loom DOT 20060911T234951-468 AT post DOT gmane DOT org>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0
In-Reply-To: <loom.20060911T234951-468@post.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Eric Blake wrote:
> mwoehlke <mwoehlke <at> tibco.com> writes:
> 
>>>> So $HOME is being set wrong. "echo $HOME | od -c" gives " /   h   o   m 
>>>>  e   /   m   w   o   e   h   l   k   e  \r  \n". "echo %HOME%" from a 
>>>> fresh cmd.exe gives "C:/Documents and Settings/mwoehlke". I ran d2u on 
>>>> /etc/profile, /etc/default/etc/profile and /etc/passwd.
> 
> I can't reproduce this.  Have you tried 'bash -lvx' for a verbose trace, to see 
> if some text-mode file is being sourced very early in your edited /etc/profile 
> which does HOME=/home/mwoehlke? The fact that Windows %HOME% is defined 
> differently than what you want in cygwin makes it seem like you are doing 
> something in /etc/profile to override what cygwin would normally do for $HOME.  

I tried 'bash -x'. Alas I stupidly did it when already in bash (hey, my 
non-bash shells are hard to get to! ;-)).

I did finally track it down; mwoehlke/.bash_profile in c:/documents and 
settings was DOS-format, and was re-invoking bash -l after changing 
HOME. I'm not sure how *that* wound up in DOS format; must've used 
Notepad the one-and-only time I edited it.

Sorry for the trouble. :-)

>> POSIXLY_CORRECT = '1' <-- what is setting this, and why?
> 
> That is being set by cygcheck, just before invoking external programs.  It 
> probably had something to do with forcing external programs to not rearrange 
> option arguments (for example, "ls foo --all" treats --all as an option, 
> but "POSIXLY_CORRECT=1 ls foo --all" treats --all as a filename).  But I think 
> it is possible to get along without doing it (repeating the example, "ls -- 
> foo --all" treats --all as a filename), and I personally think that cygcheck 
> should be patched to QUIT setting POSIXLY_CORRECT, so that we can tell the 
> masochists apart from normal users.

Ah, ok, so seeing it in cygcheck is a false positive. Didn't think that 
cygcheck would tinker with my environment (maybe it should know it is 
doing so and preserve the invocation value and print that?), so I didn't 
think to actually 'echo $POSIXLY_CORRECT'. :-)

IOW I agree with your suggestion. I just got a little freaked out 
thinking that Cygwin had unwittingly *made* me one of said users. ;-)

-- 
Matthew
KATE: Awesome Text Editor


--
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