This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygpath bug in version 1.25 -- Fundamental Change in the Behaviourof Cygpath


On Tue, 11 Feb 2003, Max Bowsher wrote:

> Igor Pechtchanski wrote:
> > 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...
>
> Yet technical correctness has come at the price of usability and
> functionality.
> E.g. You cannot convert to --mixed style from --windows style with --path.

Quite true.

> >> 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...
>
> Of course, if you simply wanted to *ensure* that the path was in unix
> format... you're stuck.

Yes.  I tracked the change to the following cvs commit:
<http://cygwin.com/ml/cygwin-cvs/2002-q4/msg00080.html>, particularly the
"(doit): Do various things to make path output work predictably." part.

> >> 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.
> >
> > Umm, 'grep'?  In particular, grep for a ";" or a "\" for a
> > windows-format path...
>
> Which is presumably vaguely what cygpath used to do.
>
> Doug: have you considered making a patch to cygpath to make it behave more
> to your liking (conditional on a command line option if need be), and
> submitting that?
>
> Max.

Umm, since I've opened my mouth on the issue, I'll submit the patch...
	Igor
==========================================================================
ChangeLog:
2003-02-11  Igor Pechtchanski <pechtcha@cs.nyu.edu>

	* cygpath.cc (doit): Add code to simply ensure the path is
	in the right format.
	(ensure_flag): New static variable.
	(options,long_options): Add 'e' flag.
	(main): Set ensure_flag.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,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

Attachment: cygpath-ensure-flag.patch
Description: Text document

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]