Setup patch to keep test version if test version installed
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Jan 26 09:36:00 GMT 2015
Hi Achim,
On Jan 25 19:42, Achim Gratz wrote:
> Corinna Vinschen writes:
> > Instead of always defaulting to the curr version, Setup now checks if
> > the installed version of a package is higher than the curr version of
> > the package. If so, and if a test version exists for this package, it
> > will choose the test version by default. A welcome side effect of this
> > is, if the test version becomes the curr version, the installed version
> > will not be higher than curr, thus the curr version will be chosen
> > again.
>
> I'd say that's good enough for now.
>
> > Index: package_meta.h
> > ===================================================================
> > RCS file: /cvs/cygwin-apps/setup/package_meta.h,v
> > retrieving revision 2.42
> > diff -u -p -r2.42 package_meta.h
> > --- package_meta.h 25 Jul 2013 12:03:49 -0000 2.42
> > +++ package_meta.h 25 Jan 2015 17:16:30 -0000
> > @@ -94,6 +94,8 @@ public:
> > {
> > if (t == TRUST_TEST && exp)
> > return exp;
> > + else if (curr < installed && exp)
> > + return exp;
> > else if (curr)
> > return curr;
> > else
>
> I'd prefer to re-arrange the tests to something along the lines of
>
> --8<---------------cut here---------------start------------->8---
> if (exp)
> {
> if ( (t == TRUST_TEST) ||
> (curr < installed) )
> --8<---------------cut here---------------end--------------->8---
Nnnno. I was planning to rearrange the code slightly and to add
comments to explain what the code does. Every time I'm looking into
setup I'm desperately missing comments. Roberts C++ class system is a
teeny little bit confusing for my taste :}
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/20150126/df2570ca/attachment.sig>
More information about the Cygwin-apps
mailing list