public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Setup patch to keep test version if test version installed
@ 2015-01-25 17:21 Corinna Vinschen
  2015-01-25 18:43 ` Achim Gratz
                   ` (2 more replies)
  0 siblings, 3 replies; 83+ messages in thread
From: Corinna Vinschen @ 2015-01-25 17:21 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 3545 bytes --]

Hi guys,

I need a bit of feedback.

One detail bugging me (and probably others as well) in Setup is this.
If I chose to install a test version of a package, and then start Setup
again, Setup will default to the current version of the package again.
If I'm just a bit careless, I'll overwrite my test version with the curr
version of this package.  And another Setup run will be required to fix
that...

So I was looking into Setup how to change the default behaviour to
something less annoying.  Unfortunately Setup is missing information,
especially if the installed package is a prev, curr, or test version.

But it has a version check mechanism.  And by commen sense, test
versions are always higher than curr versions.  So I came up with the
following change.

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.

Example:

  foo-1.22-1 is installed
  foo-1.23-1 is curr
  foo-1.24-1 is test
  ==> Setup chooses 1.23-1 as default.

User installs 1.24-1.  Next Setup run:

  foo-1.24-1 is installed
  foo-1.23-1 is curr
  foo-1.24-1 is test
  ==> Setup chooses 1.24-1 as default.

Maintainer releases a new test version:
 
  foo-1.24-1 is installed
  foo-1.23-1 is curr
  foo-1.24-2 is test
  ==> Setup chooses 1.24-2 as default.

Maintainer releases test version as curr version:

  foo-1.24-2 is installed
  foo-1.24-2 is curr
  ==> Setup chooses 1.24-2 as default.

Maintainer releases new test version:

  foo-1.24-2 is installed
  foo-1.24-2 is curr
  foo-1.25-1 is test
  ==> Setup chooses 1.24-2 as default.

Question:  Does that make sense?  From my local testing this behaviour
is much less annoying than the current behaviour, and the required code
changes are minimal.  The trustp function is used in other circumstances
as well, but the change won't kill these other usages at all.

Index: package_meta.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/package_meta.cc,v
retrieving revision 2.64
diff -u -p -r2.64 package_meta.cc
--- package_meta.cc	6 Dec 2014 13:38:54 -0000	2.64
+++ package_meta.cc	25 Jan 2015 17:16:30 -0000
@@ -570,7 +570,7 @@ packagemeta::set_action (_actions action
 	  || categories.find ("Base") != categories.end ()
 	  || categories.find ("Misc") != categories.end ())
 	{
-	  desired = default_version;
+	  desired = trustp (TRUST_CURR);
 	  if (desired)
 	    {
 	      desired.pick (desired != installed, this);
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


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread
* Re: Setup patch to keep test version if test version installed
@ 2015-02-03 13:56 ASSI
  2015-02-03 14:45 ` Achim Gratz
                   ` (2 more replies)
  0 siblings, 3 replies; 83+ messages in thread
From: ASSI @ 2015-02-03 13:56 UTC (permalink / raw)
  To: cygwin-apps

Corinna Vinschen writes:
> Did you test this version?  Is it ok to become the release version of
> setup?

WJFFM.  I didn't test the downgrade scenario since none of my
installations have "test" or "prev" packages in setup.ini, though.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 83+ messages in thread

end of thread, other threads:[~2015-02-09 10:27 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-25 17:21 Setup patch to keep test version if test version installed Corinna Vinschen
2015-01-25 18:43 ` Achim Gratz
2015-01-26  9:36   ` Corinna Vinschen
2015-01-25 23:47 ` David Stacey
2015-01-26  9:31   ` Corinna Vinschen
2015-01-26 10:15     ` Achim Gratz
2015-01-26 10:45       ` Corinna Vinschen
2015-01-26 21:19         ` Corinna Vinschen
2015-01-27  6:55           ` Achim Gratz
2015-01-27  9:01             ` Corinna Vinschen
2015-01-27 18:25               ` Achim Gratz
2015-01-27 19:22                 ` Marco Atzeri
2015-01-27 19:34                 ` Corinna Vinschen
2015-01-27 19:59                   ` Achim Gratz
2015-01-27 20:37                     ` Corinna Vinschen
2015-01-27 20:50                       ` Achim Gratz
2015-01-27 20:57                         ` Corinna Vinschen
2015-01-27 21:00                           ` Achim Gratz
2015-01-27 20:59                       ` Corinna Vinschen
2015-01-27 21:04                         ` Achim Gratz
2015-01-27 21:14                           ` Corinna Vinschen
2015-01-28  9:55                             ` Corinna Vinschen
2015-01-28 20:23                               ` Corinna Vinschen
2015-01-28 21:55                                 ` Achim Gratz
2015-01-29  9:47                                   ` Corinna Vinschen
2015-01-29 17:27                                     ` Achim Gratz
2015-01-30  9:42                                       ` Corinna Vinschen
2015-01-30 19:14                                         ` Achim Gratz
2015-01-30 22:18                                           ` Marco Atzeri
2015-01-31  7:30                                             ` Marco Atzeri
2015-02-02  9:17                                           ` Corinna Vinschen
2015-02-05  8:57                                             ` Corinna Vinschen
2015-02-05  9:12                                               ` Achim Gratz
2015-02-05  9:20                                                 ` Corinna Vinschen
2015-02-05  9:41                                                   ` Corinna Vinschen
2015-02-05 13:41                                                     ` Achim Gratz
2015-02-05 15:24                                                       ` Achim Gratz
2015-02-05 15:52                                                         ` Yaakov Selkowitz
2015-02-05 16:17                                                           ` Achim Gratz
2015-02-05 16:01                                                         ` Corinna Vinschen
2015-02-05 19:18                                                           ` Achim Gratz
2015-02-05 19:48                                                             ` Marco Atzeri
2015-02-05 19:54                                                               ` Achim Gratz
2015-02-05 21:47                                                     ` Achim Gratz
2015-02-05 21:58                                                       ` Achim Gratz
2015-02-06  9:24                                                         ` Corinna Vinschen
2015-02-06 11:25                                                           ` Achim Gratz
2015-02-06 11:33                                                             ` Corinna Vinschen
2015-02-06 14:00                                                           ` Eric Blake
2015-02-06 14:51                                                             ` Corinna Vinschen
2015-02-06 18:47                                                             ` coreutils: enable stdbuf (was: Setup patch to keep test version if test version installed) Yaakov Selkowitz
2015-02-06  9:10                                                       ` Setup patch to keep test version if test version installed Corinna Vinschen
2015-02-08 20:24                                                         ` Achim Gratz
2015-02-09 10:27                                                           ` Corinna Vinschen
2015-02-05 11:00                                               ` Yaakov Selkowitz
2015-02-03 11:33                                 ` Corinna Vinschen
2015-02-03 13:04                                   ` Ken Brown
2015-02-03 15:28                                     ` Corinna Vinschen
2015-02-03 21:50                                       ` Ken Brown
2015-02-04  8:35                                         ` Corinna Vinschen
2015-01-26  9:58 ` Corinna Vinschen
2015-01-26 10:21   ` Achim Gratz
2015-01-26 10:34     ` Corinna Vinschen
2015-01-26 10:31   ` Yaakov Selkowitz
2015-02-03 13:56 ASSI
2015-02-03 14:45 ` Achim Gratz
2015-02-03 14:52 ` Achim Gratz
2015-02-03 15:09   ` Achim Gratz
2015-02-03 15:26     ` Corinna Vinschen
2015-02-03 15:49       ` Achim Gratz
2015-02-03 15:32 ` Corinna Vinschen
2015-02-03 16:07   ` Achim Gratz
2015-02-03 16:26     ` Corinna Vinschen
2015-02-03 17:08       ` Achim Gratz
2015-02-03 20:16         ` Corinna Vinschen
2015-02-03 20:38           ` Achim Gratz
2015-02-03 21:04             ` Corinna Vinschen
2015-02-03 21:28               ` Corinna Vinschen
2015-02-04  8:56                 ` Achim Gratz
2015-02-04  9:01                 ` Corinna Vinschen
2015-02-04 10:20                   ` Corinna Vinschen
2015-02-04 11:20                     ` Achim Gratz
2015-02-04 13:50                       ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).