public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH setup] Add --allow-test-versions
@ 2021-04-20 14:37 David Allsopp
  2021-04-23 13:00 ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: David Allsopp @ 2021-04-20 14:37 UTC (permalink / raw)
  To: cygwin-apps

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

Attached adds -t/--allow-test-packages to Setup which controls the initial
state of the "Test" checkbox.

Motivation is to allow one CI cron job to be installing test versions of
packages, then we can help identify things like [1] before they're released.


David


[1] https://cygwin.com/pipermail/cygwin/2021-April/248300.html

[-- Attachment #2: 0001-Add-allow-test-packages.patch --]
[-- Type: application/octet-stream, Size: 2023 bytes --]

From 8bcb46c490c05158566d2b8a650bdd82ba876aae Mon Sep 17 00:00:00 2001
From: David Allsopp <david.allsopp@metastack.com>
Date: Tue, 20 Apr 2021 15:23:52 +0100
Subject: [PATCH] Add --allow-test-packages

---
 choose.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/choose.cc b/choose.cc
index 4fa0c74..81a5d0d 100644
--- a/choose.cc
+++ b/choose.cc
@@ -63,6 +63,7 @@ static BoolOption UpgradeAlsoOption (false, 'g', "upgrade-also", "Also upgrade i
 static BoolOption CleanOrphansOption (false, 'o', "delete-orphans", "Remove orphaned packages");
 static BoolOption ForceCurrentOption (false, 'f', "force-current", "Select the current version for all packages");
 static BoolOption PruneInstallOption (false, 'Y', "prune-install", "Prune the installation to only the requested packages");
+static BoolOption AllowTestOption (false, 't', "allow-test-packages", "Permit installation of package versions marked test");
 
 extern ThreeBarProgressPage Progress;
 
@@ -165,7 +166,7 @@ ChooserPage::initialUpdateState()
   if (ForceCurrentOption)
     {
       update_mode_id = IDC_CHOOSE_SYNC;
-      changeTrust(update_mode_id, false, true);
+      changeTrust(update_mode_id, AllowTestOption, true);
     }
   else if (hasManualSelections && !UpgradeAlsoOption)
     {
@@ -176,7 +177,7 @@ ChooserPage::initialUpdateState()
   else
     {
       update_mode_id = IDC_CHOOSE_BEST;
-      changeTrust (update_mode_id, false, true);
+      changeTrust (update_mode_id, AllowTestOption, true);
     }
 
   static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_BEST, IDC_CHOOSE_SYNC, 0 };
@@ -251,6 +252,9 @@ ChooserPage::OnInit ()
 {
   CheckDlgButton (GetHWND (), IDC_CHOOSE_HIDE, BST_CHECKED);
 
+  if (AllowTestOption)
+    CheckDlgButton (GetHWND (), IDC_CHOOSE_EXP, BST_CHECKED);
+
   /* Populate view dropdown list with choices */
   HWND viewlist = GetDlgItem (IDC_CHOOSE_VIEW);
   SendMessage (viewlist, CB_RESETCONTENT, 0, 0);
-- 
2.29.2.windows.2


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

* Re: [PATCH setup] Add --allow-test-versions
  2021-04-20 14:37 [PATCH setup] Add --allow-test-versions David Allsopp
@ 2021-04-23 13:00 ` Jon Turney
  2021-04-23 13:11   ` David Allsopp
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Turney @ 2021-04-23 13:00 UTC (permalink / raw)
  To: cygwin-apps

On 20/04/2021 15:37, David Allsopp via Cygwin-apps wrote:
> Attached adds -t/--allow-test-packages to Setup which controls the initial
> state of the "Test" checkbox.
> 
> Motivation is to allow one CI cron job to be installing test versions of
> packages, then we can help identify things like [1] before they're released.

Nice.  Thanks.

> +static BoolOption AllowTestOption (false, 't', "allow-test-packages", "Permit installation of package versions marked test");

The only quibble I have is the help text here.  The user has always been 
permitted to choose test packages, this checkbox allows setup to decide 
to use them itself.

So maybe something like "Consider package versions marked test".

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

* RE: [PATCH setup] Add --allow-test-versions
  2021-04-23 13:00 ` Jon Turney
@ 2021-04-23 13:11   ` David Allsopp
  2021-04-26 11:49     ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: David Allsopp @ 2021-04-23 13:11 UTC (permalink / raw)
  To: cygwin-apps

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

Jon Turney wrote:
> On 20/04/2021 15:37, David Allsopp via Cygwin-apps wrote:
> > Attached adds -t/--allow-test-packages to Setup which controls the
> > initial state of the "Test" checkbox.
> >
> > Motivation is to allow one CI cron job to be installing test versions
> > of packages, then we can help identify things like [1] before they're
> released.
> 
> Nice.  Thanks.
> 
> > +static BoolOption AllowTestOption (false, 't', "allow-test-packages",
> > +"Permit installation of package versions marked test");
> 
> The only quibble I have is the help text here.  The user has always been
> permitted to choose test packages, this checkbox allows setup to decide to
> use them itself.
> 
> So maybe something like "Consider package versions marked test".

No problem - see attached.

All best,


David

[-- Attachment #2: 0001-Add-allow-test-packages.patch --]
[-- Type: application/octet-stream, Size: 1957 bytes --]

From 6dd31c6881243f84e02e8d73bbc4f2d8ade3bbb4 Mon Sep 17 00:00:00 2001
From: David Allsopp <david.allsopp@metastack.com>
Date: Tue, 20 Apr 2021 15:23:52 +0100
Subject: [PATCH] Add --allow-test-packages

---
 choose.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/choose.cc b/choose.cc
index 4fa0c74..5411e85 100644
--- a/choose.cc
+++ b/choose.cc
@@ -63,6 +63,7 @@ static BoolOption UpgradeAlsoOption (false, 'g', "upgrade-also", "Also upgrade i
 static BoolOption CleanOrphansOption (false, 'o', "delete-orphans", "Remove orphaned packages");
 static BoolOption ForceCurrentOption (false, 'f', "force-current", "Select the current version for all packages");
 static BoolOption PruneInstallOption (false, 'Y', "prune-install", "Prune the installation to only the requested packages");
+static BoolOption AllowTestOption (false, 't', "allow-test-packages", "Consider package versions marked test");
 
 extern ThreeBarProgressPage Progress;
 
@@ -165,7 +166,7 @@ ChooserPage::initialUpdateState()
   if (ForceCurrentOption)
     {
       update_mode_id = IDC_CHOOSE_SYNC;
-      changeTrust(update_mode_id, false, true);
+      changeTrust(update_mode_id, AllowTestOption, true);
     }
   else if (hasManualSelections && !UpgradeAlsoOption)
     {
@@ -176,7 +177,7 @@ ChooserPage::initialUpdateState()
   else
     {
       update_mode_id = IDC_CHOOSE_BEST;
-      changeTrust (update_mode_id, false, true);
+      changeTrust (update_mode_id, AllowTestOption, true);
     }
 
   static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_BEST, IDC_CHOOSE_SYNC, 0 };
@@ -251,6 +252,9 @@ ChooserPage::OnInit ()
 {
   CheckDlgButton (GetHWND (), IDC_CHOOSE_HIDE, BST_CHECKED);
 
+  if (AllowTestOption)
+    CheckDlgButton (GetHWND (), IDC_CHOOSE_EXP, BST_CHECKED);
+
   /* Populate view dropdown list with choices */
   HWND viewlist = GetDlgItem (IDC_CHOOSE_VIEW);
   SendMessage (viewlist, CB_RESETCONTENT, 0, 0);
-- 
2.29.2.windows.2


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

* Re: [PATCH setup] Add --allow-test-versions
  2021-04-23 13:11   ` David Allsopp
@ 2021-04-26 11:49     ` Jon Turney
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Turney @ 2021-04-26 11:49 UTC (permalink / raw)
  To: David Allsopp, cygwin-apps

On 23/04/2021 14:11, David Allsopp via Cygwin-apps wrote:
> Jon Turney wrote:
>> On 20/04/2021 15:37, David Allsopp via Cygwin-apps wrote:
>>> Attached adds -t/--allow-test-packages to Setup which controls the
>>> initial state of the "Test" checkbox.
>>>
>>> Motivation is to allow one CI cron job to be installing test versions
>>> of packages, then we can help identify things like [1] before they're
>> released.
>>
>> Nice.  Thanks.
>>
>>> +static BoolOption AllowTestOption (false, 't', "allow-test-packages",
>>> +"Permit installation of package versions marked test");
>>
>> The only quibble I have is the help text here.  The user has always been
>> permitted to choose test packages, this checkbox allows setup to decide to
>> use them itself.
>>
>> So maybe something like "Consider package versions marked test".
> 
> No problem - see attached.
> 

Thanks for producing an updated patch!

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

end of thread, other threads:[~2021-04-26 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 14:37 [PATCH setup] Add --allow-test-versions David Allsopp
2021-04-23 13:00 ` Jon Turney
2021-04-23 13:11   ` David Allsopp
2021-04-26 11:49     ` Jon Turney

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).