Setup patch to keep test version if test version installed

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Feb 3 21:04:00 GMT 2015


On Feb  3 21:37, Achim Gratz wrote:
> Corinna Vinschen writes:
> > On Feb  3 18:08, Achim Gratz wrote:
> >> Corinna Vinschen writes:
> >> > How so?  Setup is not a Cygwin application.
> >> 
> >> Good point.  Then I've no idea at all, save the compiler.
> >
> > I had a look into this and even rearranged the behaviour when --help
> > output is requested...
> >
> > However, I'm mildly sure this behaviour didn't change in the last couple
> > of years.  The reason is that setup is not a console application but a
> > GUI application.  When running a GUI application from CMD, CMD will
> > detach.  Of course, when --help output is requested, setup calls
> > AllocConsole, but that's too late.  This does not occur in a Cygwin
> > shell becasue Cygwin always waits for process completion unless the
> > process is sent to the background.
> >
> > I now made the latest setup 2.864 available as standard setup version
> > on sourceware and removed the test releases.
> 
> I'm not sure we're talking about the same thing.  I've recently added
> code to print an error message along with the parameter usage when a
> wrong option or other non-parseable stuff was given instead of simply
> exiting with no indication other than the non-zero exit code.  The
> changes you've just installed look good to me, but they don't touch the
> exit path in question:
> 
> --8<---------------cut here---------------start------------->8---
>      if (!GetOption::GetInstance ().Process (argc,_argv, NULL))
> -      exit (1);
> +      {
> +	GetOption::GetInstance ().ParameterUsage (cerr
> +						  << "\nError during option processing."
> +						  << "\nCommand Line Options:\n");
> +	exit (1);
> +      }
> --8<---------------cut here---------------end--------------->8---
> 
> I guess with those changes one could now use Log (LOG_TIMESTAMP) instead
> of cerr in that place and hopefully the output would appear again?  I
> was pretty certain I tested that in both mintty and CMD, but maybe
> not...

I was referring explicitely to the CMD prompt being too early.  I didn't
test the situation when specifying a wrong option, sorry.  The point in
the file where this occurs is somewhat early.  At this point the log
stuff isn't initialized and AttachConsole hasn't been called.  I'll 
look into that, maybe it can be fixed easily.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20150203/a70fe8c9/attachment.sig>


More information about the Cygwin-apps mailing list