public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* setup : request
@ 2015-07-04  9:26 Marco Atzeri
  2015-07-04 10:05 ` Achim Gratz
  2015-07-09 23:17 ` Yaakov Selkowitz
  0 siblings, 2 replies; 4+ messages in thread
From: Marco Atzeri @ 2015-07-04  9:26 UTC (permalink / raw)
  To: cygwin-apps

Achim,
as you are playing with setup,
can you add a switch that allow to commute between:

old     behaviour : current or test is default installed
current behaviour : if installed is higher than current do nothing

The new behaviour is usually fine, but going back and forth
between all new perl test stuff is a pain when I need to remove
the 5.22 stuff.

I have no enough disk space to install 4 versions
x86 vs X86_64 + perl 5.14 vs 5.22

  ;-)

Regards
Marco

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

* Re: setup : request
  2015-07-04  9:26 setup : request Marco Atzeri
@ 2015-07-04 10:05 ` Achim Gratz
  2015-07-09 23:17 ` Yaakov Selkowitz
  1 sibling, 0 replies; 4+ messages in thread
From: Achim Gratz @ 2015-07-04 10:05 UTC (permalink / raw)
  To: cygwin-apps

Marco Atzeri writes:
> as you are playing with setup,
> can you add a switch that allow to commute between:
>
> old     behaviour : current or test is default installed
> current behaviour : if installed is higher than current do nothing

I plan a patch that installs exactly what is requested, including doing
all necessary downgrades.  I already have a local patch that installs
only those things that are requested and deletes anything else it finds,
but it doesn't do downgrades yet, see:

http://repo.or.cz/w/cygwin-setup/local.git

> The new behaviour is usually fine, but going back and forth
> between all new perl test stuff is a pain when I need to remove
> the 5.22 stuff.

You can use the sed trick that I posted for going from RC2 to the
release version.  As long as setup is convinced that the version on disk
is older than the one that you're going to install, everything will be
fine.

> I have no enough disk space to install 4 versions
> x86 vs X86_64 + perl 5.14 vs 5.22

Actually you could install both Perls and just switch the link from
/bin/perl.exe accordingly, I'd think.  To do this, you'd either need to
install the one set of packages by hand or remove the corresponding
entries in install.db before flying in the second set.  The problem is
of course that the dependency extraction in cygport will become
confused, so that probably doesn't help as much as you'd wish it did.

Another trick I once used is to install Cygwin into a virtual disk file
(.vhd), mount that one read-only and put the differences into an overlay
image.  As long as the base image stays the same you can have two
different overlays.  I think you need a Pro version of WIndows to do
this, though.


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: setup : request
  2015-07-04  9:26 setup : request Marco Atzeri
  2015-07-04 10:05 ` Achim Gratz
@ 2015-07-09 23:17 ` Yaakov Selkowitz
  2015-07-13  9:46   ` Corinna Vinschen
  1 sibling, 1 reply; 4+ messages in thread
From: Yaakov Selkowitz @ 2015-07-09 23:17 UTC (permalink / raw)
  To: cygwin-apps

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

On Sat, 2015-07-04 at 11:25 +0200, Marco Atzeri wrote:
> Achim,
> as you are playing with setup,
> can you add a switch that allow to commute between:
> 
> old     behaviour : current or test is default installed
> current behaviour : if installed is higher than current do nothing
> 
> The new behaviour is usually fine, but going back and forth
> between all new perl test stuff is a pain when I need to remove
> the 5.22 stuff.

On Fedora there is "yum update" and "yum distro-sync", which are
distinct commands corresponding to each of these behaviours.  So my
thought was that we could add a fourth "Sync" option to the
Keep/Curr/Exp radio buttons.  I've attached a barely tested *draft*
patch along these lines, but it almost certainly needs more work.

--
Yaakov


[-- Attachment #2: setup-distro-sync.patch --]
[-- Type: text/x-patch, Size: 5886 bytes --]

diff --git a/IniDBBuilderPackage.cc b/IniDBBuilderPackage.cc
index 7ee2af4..d7a4237 100644
--- a/IniDBBuilderPackage.cc
+++ b/IniDBBuilderPackage.cc
@@ -568,6 +568,7 @@ IniDBBuilderPackage::add_correct_version()
   switch (trust)
   {
     case TRUST_CURR:
+    case TRUST_SYNC:
       v = &(cp->curr);
     break;
     case TRUST_PREV:
diff --git a/PackageTrust.h b/PackageTrust.h
index 3e6801d..97f3a5f 100644
--- a/PackageTrust.h
+++ b/PackageTrust.h
@@ -23,6 +23,7 @@ typedef enum
   TRUST_PREV,
   TRUST_CURR,
   TRUST_TEST,
+  TRUST_SYNC,
   NTRUST
 }
 trusts;
diff --git a/choose.cc b/choose.cc
index ec42c94..1d318b5 100644
--- a/choose.cc
+++ b/choose.cc
@@ -81,6 +81,7 @@ static ControlAdjuster::ControlInfo ChooserControlsInfo[] = {
   {IDC_CHOOSE_KEEP, 		CP_RIGHT,   CP_TOP},
   {IDC_CHOOSE_CURR, 		CP_RIGHT,   CP_TOP},
   {IDC_CHOOSE_EXP, 		CP_RIGHT,   CP_TOP},
+  {IDC_CHOOSE_SYNC, 		CP_RIGHT,   CP_TOP},
   {IDC_CHOOSE_VIEW, 		CP_RIGHT,   CP_TOP},
   {IDC_LISTVIEW_POS, 		CP_RIGHT,   CP_TOP},
   {IDC_CHOOSE_VIEWCAPTION,	CP_RIGHT,   CP_TOP},
@@ -154,7 +155,7 @@ ChooserPage::createListview ()
 	 GetLastError () << endLog;
 
   /* FIXME: do we need to init the desired fields ? */
-  static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_CURR, IDC_CHOOSE_EXP, 0 };
+  static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_CURR, IDC_CHOOSE_EXP, IDC_CHOOSE_SYNC, 0 };
   rbset (GetHWND (), ta, IDC_CHOOSE_CURR);
   ClearBusy ();
 }
@@ -282,6 +283,7 @@ ChooserPage::OnInit ()
   AddTooltip (IDC_CHOOSE_KEEP, IDS_TRUSTKEEP_TOOLTIP);
   AddTooltip (IDC_CHOOSE_CURR, IDS_TRUSTCURR_TOOLTIP);
   AddTooltip (IDC_CHOOSE_EXP, IDS_TRUSTEXP_TOOLTIP);
+  AddTooltip (IDC_CHOOSE_SYNC, IDS_TRUSTSYNC_TOOLTIP);
   AddTooltip (IDC_CHOOSE_VIEW, IDS_VIEWBUTTON_TOOLTIP);
   AddTooltip (IDC_CHOOSE_HIDE, IDS_HIDEOBS_TOOLTIP);
   AddTooltip (IDC_CHOOSE_SEARCH_EDIT, IDS_SEARCH_TOOLTIP);
@@ -414,6 +416,11 @@ ChooserPage::OnMessageCmd (int id, HWND hwndctl, UINT code)
         changeTrust (TRUST_TEST);
       break;
 
+    case IDC_CHOOSE_SYNC:
+      if (IsButtonChecked (id))
+        changeTrust (TRUST_SYNC);
+      break;
+
     case IDC_CHOOSE_VIEW:
       chooser->cycleViewMode ();
       if (!SetDlgItemText
diff --git a/package_meta.h b/package_meta.h
index b24d4fc..ccb64e6 100644
--- a/package_meta.h
+++ b/package_meta.h
@@ -101,8 +101,10 @@ public:
        than "curr".  Rather than pulling the user back to "curr", we install
        "test" if a "test" version is available and the version number is higher,
        or we stick to "installed" if not.  This reflects the behaviour of
-       `yum update' on Fedora. */
-    if (_default && curr && installed
+       `yum update' on Fedora.
+       If TRUST_SYNC is chosen, then we want to pull the user back to "curr".
+       This reflects the behaviour of `yum distro-sync' on Fedora. */
+    if (_default && curr && installed && t != TRUST_SYNC
 	&& packageversion::compareVersions (curr, installed) < 0)
       {
 	if (exp && packageversion::compareVersions (installed, exp) < 0)
diff --git a/res.rc b/res.rc
index 5013b31..0b574db 100644
--- a/res.rc
+++ b/res.rc
@@ -316,7 +316,8 @@ END
 #define SETUP_VIEWCAP_X		(SETUP_STANDARD_DIALOG_W - SETUP_VIEWCAP_W - 7)
 #define SETUP_VIEW_W		(26)
 #define SETUP_VIEW_X		(SETUP_VIEWCAP_X - SETUP_VIEW_W - 5)
-#define SETUP_EXP_X		(SETUP_VIEW_X - SETUP_KPCE_W - 5)
+#define SETUP_SYNC_X		(SETUP_VIEW_X - SETUP_KPCE_W - 5)
+#define SETUP_EXP_X		(SETUP_SYNC_X - SETUP_KPCE_W - 5)
 #define SETUP_CURR_X		(SETUP_EXP_X - SETUP_KPCE_W - 5)
 #define SETUP_KEEP_X		(SETUP_CURR_X - SETUP_KPCE_W - 5)
 
@@ -346,6 +347,8 @@ BEGIN
                     SETUP_CURR_X, 30, SETUP_KPCE_W, 14
     CONTROL         "E&xp", IDC_CHOOSE_EXP, "Button", BS_AUTORADIOBUTTON,
                     SETUP_EXP_X, 30, SETUP_KPCE_W, 14
+    CONTROL         "S&ync", IDC_CHOOSE_SYNC, "Button", BS_AUTORADIOBUTTON,
+                    SETUP_SYNC_X, 30, SETUP_KPCE_W, 14
     PUSHBUTTON      "&View", IDC_CHOOSE_VIEW, SETUP_VIEW_X, 30, SETUP_VIEW_W,
                     14, WS_GROUP
     CONTROL         "", IDC_HEADSEPARATOR, "Static", SS_BLACKFRAME | SS_SUNKEN,
@@ -531,10 +534,12 @@ BEGIN
     IDS_TRUSTKEEP_TOOLTIP   "Sets all packages to their currently installed "
        "version.  This is equivalent to telling setup not to make any "
        "changes to any package."
-    IDS_TRUSTCURR_TOOLTIP   "Globally select the version that is currently "
-       "considered the most stable. (RECOMMENDED)"
+    IDS_TRUSTCURR_TOOLTIP   "Globally select the most stable version unless it "
+       "is older than the currently installed version. (RECOMMENDED)"
     IDS_TRUSTEXP_TOOLTIP    "Globally select the most recent version, even if "
        "that version is considered Experimental or for test use by the maintainer."
+    IDS_TRUSTSYNC_TOOLTIP   "Globally select the most stable version, even if "
+       "that version is older than the currently installed version."
     IDS_VIEWBUTTON_TOOLTIP  "Cycles the package view.  This determines "
        "which packages are shown in the chooser below.\r\n"
        "\r\n"
diff --git a/resource.h b/resource.h
index 48f03ab..125eb4f 100644
--- a/resource.h
+++ b/resource.h
@@ -26,6 +26,7 @@
 #define IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO 123
 #define IDS_SKIP_PACKAGE                  124
 #define IDS_TRUSTKEEP_TOOLTIP             125
+#define IDS_TRUSTSYNC_TOOLTIP             126
 #define IDS_TRUSTCURR_TOOLTIP             127
 #define IDS_TRUSTEXP_TOOLTIP              128
 #define IDS_VIEWBUTTON_TOOLTIP            129
@@ -119,6 +120,7 @@
 #define IDC_CHOOSE_VIEW                   531
 #define IDC_CHOOSE_EXP                    532
 #define IDC_CHOOSE_CURR                   533
+#define IDC_CHOOSE_SYNC                   534
 #define IDC_CHOOSE_LIST                   535
 #define IDC_INS_ACTION                    536
 #define IDC_ROOT_DESKTOP                  537

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

* Re: setup : request
  2015-07-09 23:17 ` Yaakov Selkowitz
@ 2015-07-13  9:46   ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2015-07-13  9:46 UTC (permalink / raw)
  To: cygwin-apps

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

On Jul  9 18:17, Yaakov Selkowitz wrote:
> On Sat, 2015-07-04 at 11:25 +0200, Marco Atzeri wrote:
> > Achim,
> > as you are playing with setup,
> > can you add a switch that allow to commute between:
> > 
> > old     behaviour : current or test is default installed
> > current behaviour : if installed is higher than current do nothing
> > 
> > The new behaviour is usually fine, but going back and forth
> > between all new perl test stuff is a pain when I need to remove
> > the 5.22 stuff.
> 
> On Fedora there is "yum update" and "yum distro-sync", which are
> distinct commands corresponding to each of these behaviours.  So my
> thought was that we could add a fourth "Sync" option to the
> Keep/Curr/Exp radio buttons.  I've attached a barely tested *draft*
> patch along these lines, but it almost certainly needs more work.

I didn't look closely at the code, but the idea is ok.


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] 4+ messages in thread

end of thread, other threads:[~2015-07-13  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-04  9:26 setup : request Marco Atzeri
2015-07-04 10:05 ` Achim Gratz
2015-07-09 23:17 ` Yaakov Selkowitz
2015-07-13  9:46   ` 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).