[Patch] Keep Button

2002-11-28 Thread Max Bowsher
Robert Collins wrote:
> Ah. Well seems to me this is the appropriate place to put it, it's more
> flexible as a category manipulator than a trust level.

But far less visible to new users.

> And less complex to code.

Really... ? :-)


#
Index: choose.cc
===
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/choose.cc,v
retrieving revision 2.109
diff -u -p -r2.109 choose.cc
--- choose.cc 2002/11/25 13:26:05 2.109
+++ choose.cc 2002/11/28 20:55:10
@@ -437,7 +437,7 @@ create_listview (HWND dlg, RECT * r)
   pkg.set_requirements (chooser->deftrust);
 }
   /* FIXME: do we need to init the desired fields ? */
-  static int ta[] = { IDC_CHOOSE_PREV, IDC_CHOOSE_CURR, IDC_CHOOSE_EXP,
0 };
+  static int ta[] = { IDC_CHOOSE_KEEP, IDC_CHOOSE_CURR, IDC_CHOOSE_EXP,
0 };
   rbset (dlg, ta, IDC_CHOOSE_CURR);
 }

@@ -621,15 +621,14 @@ ChooserPage::OnMessageCmd (int id, HWND
   packagedb db;
   switch (id)
 {
-case IDC_CHOOSE_PREV:
+case IDC_CHOOSE_KEEP:
   if (IsDlgButtonChecked (GetHWND (), id))
   {
-default_trust (lv, TRUST_PREV);
  for (vector ::iterator i = db.packages.begin ();
   i != db.packages.end (); ++i)
   {
 packagemeta & pkg = **i;
-pkg.set_requirements (TRUST_PREV);
+pkg.desired = pkg.installed;
   }
 set_view_mode (lv, chooser->get_view_mode ());
 break;
Index: res.rc
===
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/res.rc,v
retrieving revision 2.44
diff -u -p -r2.44 res.rc
--- res.rc 2002/11/25 00:41:25 2.44
+++ res.rc 2002/11/28 20:59:04
@@ -288,8 +288,8 @@ STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHI
 CAPTION "Select Packages"
 FONT 8, "MS Sans Serif"
 BEGIN
-CONTROL "&Prev",IDC_CHOOSE_PREV,"Button",BS_AUTORADIOBUTTON |
-WS_GROUP | WS_TABSTOP,150,30,27,10
+CONTROL "&Keep",IDC_CHOOSE_KEEP,"Button",BS_AUTORADIOBUTTON |
+WS_GROUP | WS_TABSTOP,150,30,30,10
 CONTROL
"&Curr",IDC_CHOOSE_CURR,"Button",BS_AUTORADIOBUTTON,185,
 30,25,10
 CONTROL
"E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON,220,30,
Index: resource.h
===
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/resource.h,v
retrieving revision 2.19
diff -u -p -r2.19 resource.h
--- resource.h 2002/11/25 00:41:25 2.19
+++ resource.h 2002/11/28 20:54:51
@@ -92,7 +92,7 @@
 #define IDC_CHOOSE_VIEW 1035
 #define IDC_CHOOSE_EXP  1036
 #define IDC_CHOOSE_CURR 1037
-#define IDC_CHOOSE_PREV 1038
+#define IDC_CHOOSE_KEEP 1038
 #define IDC_CHOOSE_LIST 1039
 #define IDC_INS_ACTION  1040
 #define IDC_ROOT_DESKTOP1041
#




Re: [Patch] Keep Button

2002-11-28 Thread Robert Collins
On Fri, 2002-11-29 at 08:04, Max Bowsher wrote:
> Robert Collins wrote:
> > Ah. Well seems to me this is the appropriate place to put it, it's more
> > flexible as a category manipulator than a trust level.
> 
> But far less visible to new users.
> 
> > And less complex to code.
> 
> Really... ? :-)

Really. What youve put below has several problems.

1) The prev trust level hasn't been removed as a group decision. You
need to keep that for now at least. 
2) You are not checking requirements for packages, so if the user
removes  they will be left with a broken install.

Rob

-- 
---
GPG key available at: http://users.bigpond.net.au/robertc/keys.txt.
---



signature.asc
Description: This is a digitally signed message part


Re: [Patch] Keep Button

2002-11-28 Thread Max Bowsher
Robert Collins <[EMAIL PROTECTED]> wrote:

> On Fri, 2002-11-29 at 08:04, Max Bowsher wrote:
>> Robert Collins wrote:
>>> Ah. Well seems to me this is the appropriate place to put it, it's
>>> more flexible as a category manipulator than a trust level.
>>
>> But far less visible to new users.
>>
>>> And less complex to code.
>>
>> Really... ? :-)
>
> Really. What youve put below has several problems.
>
> 1) The prev trust level hasn't been removed as a group decision. You
> need to keep that for now at least.

I'm confident it will be shortly.

> 2) You are not checking requirements for packages, so if the user
> removes  they will be left with a broken install.

Um? I'm just resetting all packages to what is installed already.
Admittedly, it won't *fix* an install if the user has already manually
broken dependencies, but I don't understand how it can break an install.

Max.




Re: [Patch] Keep Button

2002-11-29 Thread Robert Collins
On Fri, 2002-11-29 at 09:28, Max Bowsher wrote:

> > 1) The prev trust level hasn't been removed as a group decision. You
> > need to keep that for now at least.
> 
> I'm confident it will be shortly.

Does that change my statement?
 
> > 2) You are not checking requirements for packages, so if the user
> > removes  they will be left with a broken install.
> 
> Um? I'm just resetting all packages to what is installed already.
> Admittedly, it won't *fix* an install if the user has already manually
> broken dependencies, but I don't understand how it can break an install.

If a package is released with broken dependencies (as has happened
before) then this won't correct it for them, ever. 

It's also the wrong approach IMO. We should offer single package
selection for this problem, not freeze the whole environment. I.e.:

Choose one of:
Update cygwin install (we make this the default)
Install a single new cygwin package.

Where the lower one offers none of the complexity of the current choose,
just a single, searchable list of packages. Once that is selected, a
partial screen appears listing the minim changes needed to support that
package.

Rob

-- 
---
GPG key available at: http://users.bigpond.net.au/robertc/keys.txt.
---



signature.asc
Description: This is a digitally signed message part


Re: [Patch] Keep Button

2002-11-29 Thread Max Bowsher
Robert Collins <[EMAIL PROTECTED]> wrote:

> On Fri, 2002-11-29 at 09:28, Max Bowsher wrote:
>
>>> 1) The prev trust level hasn't been removed as a group decision. You
>>> need to keep that for now at least.
>>
>> I'm confident it will be shortly.
>
> Does that change my statement?

No. I should have explained myself better: I'm reluctant to enlarge the
patch, when I believe that by the time that the other issues below have been
resolved, this will no longer be an issue.
In the (IMO unlikely) event that this issue becomes the only one blocking
this patch, then I will happily fix it.
So, please ignore this issue until the others below have been resolved, at
which point, I will either fix it, or it will have gone away by itself.

>>> 2) You are not checking requirements for packages, so if the user
>>> removes  they will be left with a broken install.
>>
>> Um? I'm just resetting all packages to what is installed already.
>> Admittedly, it won't *fix* an install if the user has already
>> manually broken dependencies, but I don't understand how it can
>> break an install.
>
> If a package is released with broken dependencies (as has happened
> before) then this won't correct it for them, ever.

Hmm. To me 'Keep' should mean 'Keep' not 'reevaluate dependencies and do
something else'. I mean, the user could equally well manually click through
to keep on each package. Unless we are going to forbid that, I think the
behaviour of my patch is correct as it stands.

> It's also the wrong approach IMO. We should offer single package
> selection for this problem, not freeze the whole environment. I.e.:
>
> Choose one of:
> Update cygwin install (we make this the default)
> Install a single new cygwin package.
>
> Where the lower one offers none of the complexity of the current
> choose, just a single, searchable list of packages. Once that is
> selected, a partial screen appears listing the minim changes needed
> to support that package.

Umm... yuk!

2 things. One: What about installing 2 new packages?
And Two: Why make a new way to do something instead of improving what we
already have, and is nearly right anyway?

Max.