On Tue, 11 Feb 2003, Newton, Doug wrote:

> If this change is what is desired by the majority, that is fine.  BUT, it
> should have been made clear that the fundamental behaviour of cygpath had
> changed.  I have many scripts that no longer work.  Even the jakarata ant
> tool's start-up script now mangles the classpath because of this change in
> behaviour.

This change makes the output correct.  I suppose that would be something
desired by the majority...

> At least with version 1.21 (and I believe through 1.24, just glancing
> through the CVS history), the behaviour was always as follows:
>
> "cygpath --path --unix $UNIX_CLASSPATH" returns UNIX_CLASSPATH
> "cygpath --path --unix $DOS_CLASSPATH" return UNIX_CLASSPATH
> "cygpath --path --windows $UNIX_CLASSPATH" returns DOS_CLASSPATH
> "cygpath --path --windows $DOS_CLASSPATH" returns DOS_CLASSPATH
>
> Now the behaviour is as follows:
>
> "cygpath --path --unix $UNIX_CLASSPATH" returns a truncated UNIX_CLASSPATH
> if it is too long

Yes, because it treats it as one filename...

> "cygpath --path --unix $DOS_CLASSPATH" return UNIX_CLASSPATH
> "cygpath --path --windows $UNIX_CLASSPATH" returns DOS_CLASSPATH
> "cygpath --path --windows $DOS_CLASSPATH" returns a garbled DOS_CLASSPATH
> regardless of length (e.g. the path is transformed from "C:/home/build" to
> "C;c:/home/build"

Yes, because it treats ":" as a separator.

> We no longer have the option to run a classpath of unknown format through
> cgypath to make sure it is in a known format.  This is the issue in the
> jakarta ant tool.  It makes no assumptions on what the format of the path is
> -- it immediately converts it to unix regardless of the current format.

It makes an assumption that the format is Windows.  Otherwise, there'd be
no need to convert to Unix format...

> This was the expected behaviour.
>
> Is there another utility that can be used to identify the format of a
> classpath?  This will be needed to account for the changed behaviour in
> modifying scripts.
> --Doug Newton
> [EMAIL PROTECTED]

Umm, 'grep'?  In particular, grep for a ";" or a "\" for a windows-format
path...
        Igor
-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                [EMAIL PROTECTED]
ZZZzz /,`.-'`'    -.  ;-;;,_            [EMAIL PROTECTED]
     |,4-  ) )-,_. ,\ (  `'-'           Igor Pechtchanski
    '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to