X-Spam-Check-By: sourceware.org
Date: Thu, 12 Oct 2006 09:41:33 -0400 (EDT)
From: Igor Peshansky <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: John Morrison <john@morrison.mine.nu>
cc: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: vim-7.0.122-1
In-Reply-To: <51442.84.246.168.11.1160654571.squirrel@mail.morrison.mine.nu>
Message-ID: <Pine.GSO.4.63.0610120924170.28291@access1.cims.nyu.edu>
References: <452D2696.3060602@users.sourceforge.net>      <014c01c6ed5b$d6a1e9a0$a501a8c0@CAM.ARTIMI.COM>     <egjc38$teg$1@sea.gmane.org>      <20061012065523.GP13105@calimero.vinschen.de>      <20061012111836.GA29649@trixie.casa.cgf.cx>     <20061012115416.GB8323@calimero.vinschen.de>  <51442.84.246.168.11.1160654571.squirrel@mail.morrison.mine.nu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Thu, 12 Oct 2006, John Morrison wrote:

> On Thu, October 12, 2006 12:54 pm, Corinna Vinschen wrote:
> >
> > I think it is needed.  At least the base-files-mketc.sh postinstall
> > script creates paths which point outside the Cygwin root, so it either
> > needs to reference cygdrive paths, or use DOS paths.  Using cygdrives
> > paths is preferable, IMHO.  Since the cygdrive path is not fixed, and
> > can even differ between different users on the same machine, there must
> > be a fixed method to reference these paths.
> >
> > Personally I'd rather not further clutter the root directory, which is
> > why /proc seems to me to be a better place to point to the cygdrive
> > paths in a constant fashion.  But that is only a mild opposition.  I'd
> > also go along with /cygdrive.
>
> I've changed the script (which I didn't write!) to use cygpath --sysdir
> which outputs cygdrive paths.  I should be able to get a new release out
> by the weekend, but I'll hold off until this discussion is decided.
> Personally I don't mind either an always existing /cygdrive or something
> in /proc.  Only thing that would ask is; what would cygpath output?

John,

I wrote the script originally, and the initial version did use POSIX
paths.  I've just re-read the early discussions, and found this:

<http://cygwin.com/ml/cygwin-apps/2003-02/msg00033.html>.

I think the issue is still valid -- if the installing user has the
user-level cygdrive prefix set, "cygpath --sysdir" will output something
that won't work for other users on the machine, and the links will be
broken.

If we add a standard /cygdrive prefix, we'll also need to change cygpath
to force that standard prefix for out-of-tree paths (otherwise user and
system mounts take precedence).  Something like "cygpath -S -s" (or
"cygpath --sysdir --standard")...

However, if we really want to make this more robust, we'd need something
like this:

SAVED_CYGDRIVE="`mount -m | grep '^mount -u -[bt] -\?-c'`"
mount -u -b -c '/cygdrive'
# Do the path manipulation here
umount -u -c
[ -n "$SAVED_CYGDRIVE" ] && eval "$SAVED_CYGDRIVE"

Opinions?
	Igor
P.S. One annoying thing about /cygdrive is that tab-completion for it is
annoying OOTB, since there are also /cygwin.bat and /cygwin.ico.  One
thing I normally do on all new installs is rename those two files to
/Cygwin.bat and /Cygwin.ico -- since bash uses case-sensitive completion
by default, this allows /c<Tab> to get to /cygdrive immediately.  Can we,
perhaps, rename the .bat and the .ico files to start with a capital 'C' on
new installs?  I'll send a patch to cygwin-apps.
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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

