public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Setup snpshot bug no skip/keep
  2001-11-09  9:51       ` Brian Keener
@ 2001-11-01  5:57         ` Robert Collins
  2001-11-11  8:26           ` Robert Collins
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Collins @ 2001-11-01  5:57 UTC (permalink / raw)
  To: bkeener, cygwin-apps; +Cc: cygwin

Redirected to cygwin-apps, please followup there.

----- Original Message -----
From: "Brian Keener" <bkeener@thesoftwaresource.com>


> >
>
> Sure I noticed packages are of type info which is itself a structure
with all the
> pertinent info.  I also notice that the *installed* structure is a
different
> substructure from the selectable packages substructure *info*.  Under
a normal
> situation this is not a problem (and probably isn't for you more
experienced coders)
> but for me it was.  I will try to explain:  In info we have
bucket/slot (probably not
> the right term but go with me here) 0 which is Prev and bucket 1 is
Current and
> bucket 2 is Test or something like that and then we have a separate
structure for
> installed.  Now when installed is one of Prev, Curr or Test all is
wonderful and the
> enum we use to step through the Trusts works great.  But if installed
is outdated you
> now get a lot of extraneous code (at least I thought so) because
installed is not one
> of Prev, Curr, and Test and yet you want the option to keep the
installed available
> just like *keep*ing the Prev, Curr, or Test is available.  In my
attempts it was
> tough and created I lot of unnecessary code.  My contention is that
the structure
> should be bucket 0 is prev, bucket 1 is current, bucket 2 is test and
bucket 3 is
> installed.  Basically have 4 versions instead of 3 and two of them may
or may not be
> the same.  This also makes it easier for the actions which are based
on the trusts to

The problem with 4 buckets is that either 1 is a pointer to another or
you have to remember to change 2 whenever you change one. Both of which
will be annoying. When this becomes a bit more oop, this can be made
transparent, and then it will be easier.

The current UNKNOWN bucket, IMO should be used to store the installed
package details IFF it's not listed in setup.ini.

Also local tarballs should be included, and the bucket count should be
dynamic.

> I am sure you guys handled this no sweat - since I see Robert has
posted a fix for
> the skip/keep anyways and I did not mean to imply it was impossible to
fix, just
> thought I thought a slight structure change would make it not so
cumbersome (with my
> skills).

Yah, well my fix was broken, as I found when I tested.

Rob



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Setup snpshot bug no skip/keep
       [not found] <1005263562.1258.ezmlm@sources.redhat.com>
@ 2001-11-09  5:57 ` John P. Rouillard
  2001-11-09  6:15   ` Robert Collins
  2001-11-09  7:13   ` Brian Keener
  0 siblings, 2 replies; 7+ messages in thread
From: John P. Rouillard @ 2001-11-09  5:57 UTC (permalink / raw)
  To: cygwin

"Gareth Pearce" <tilps@hotmail.com> on Fri, 9 Nov 2001 06:44:38 +1100
said:
>Problem with no keep/skip option turning up ... happened to me last night
>... So I read some code ... tried to hunt down the problem...
>AFAICT - heh havent read much of this code yet - if the installed version is
>not one of the ones listed, in setup, you wont be able to choose keep or
>skip

That jibes with what I just saw. The setup.ini file lists 1.3.4-4 and
1.3.2-1 as the current and prev entries for cygwin. Since I have
1.3.2-2 installed, I don't get a keep option.

>in choose.cc set_action - there is a if(!pkg->installed) for skip ... i
>propose changing this so as to check if the installed version is one of the
>available ones instead.

I would suggest the following:

  if the package is installed always display keep. Doesn't matter if
  the version is available or not. It was available at some time
  and if the user want's to keep it, they should be able to.

> Then possible renameing skip to keep when pkg->installed is true.

I think you meant "if the package is not installed display skip" right?

>Will write a patch if anyone thinks this makes sense...

Yes. I think you must ALWAYS have a keep or skip option available.

				-- rouilj
John Rouillard
===============================================================================
My employers don't acknowledge my existence much less my opinions.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Setup snpshot bug no skip/keep
  2001-11-09  5:57 ` Setup snpshot bug no skip/keep John P. Rouillard
@ 2001-11-09  6:15   ` Robert Collins
  2001-11-09  7:13   ` Brian Keener
  1 sibling, 0 replies; 7+ messages in thread
From: Robert Collins @ 2001-11-09  6:15 UTC (permalink / raw)
  To: rouilj, cygwin

----- Original Message -----
From: "John P. Rouillard" <rouilj@cs.umb.edu>
> Yes. I think you must ALWAYS have a keep or skip option available.

Yes, this has always been the case. It's a bug!

Anyway, I've checked in a potential fix to the HEAD branch. I'm off to
bed now, but will backport it and produce a snapshot tomorrow morning.

Rob


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Setup snpshot bug no skip/keep
  2001-11-09  5:57 ` Setup snpshot bug no skip/keep John P. Rouillard
  2001-11-09  6:15   ` Robert Collins
@ 2001-11-09  7:13   ` Brian Keener
  2001-11-09  8:16     ` Christopher Faylor
  1 sibling, 1 reply; 7+ messages in thread
From: Brian Keener @ 2001-11-09  7:13 UTC (permalink / raw)
  To: cygwin

John P. Rouillard wrote:
> Yes. I think you must ALWAYS have a keep or skip option available.
>
The change definitely makes sense and was in the code at one point in time.  
During the heavy rewrites in choose.cc and the new way the structures and the 
TRUSTS are handled this got lost.  Like I said - I had started a change but the 
installed version is in a different part of the structure from Prev, Curr, Test 
Versions and it makes this logic difficult (for me).

I believe the structure needs an entry for Installed - just like it has one for 
Prev, curr, and test and then setup could always show keep if that entry was 
selected and if the part of the structure was empty (thus the package was not 
installed then setup should show skip.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Setup snpshot bug no skip/keep
  2001-11-09  7:13   ` Brian Keener
@ 2001-11-09  8:16     ` Christopher Faylor
  2001-11-09  9:51       ` Brian Keener
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Faylor @ 2001-11-09  8:16 UTC (permalink / raw)
  To: cygwin

On Fri, Nov 09, 2001 at 10:13:41AM -0500, Brian Keener wrote:
>John P. Rouillard wrote:
>> Yes. I think you must ALWAYS have a keep or skip option available.
>>
>The change definitely makes sense and was in the code at one point in time.  
>During the heavy rewrites in choose.cc and the new way the structures and the 
>TRUSTS are handled this got lost.  Like I said - I had started a change but the 
>installed version is in a different part of the structure from Prev, Curr, Test 
>Versions and it makes this logic difficult (for me).
>
>I believe the structure needs an entry for Installed - just like it has one for 
>Prev, curr, and test

Here's the structure.  Notice anything?

typedef struct
{
  char *name;           /* package name, like "cygwin" */
  char *sdesc;          /* short description (replaces "name" if provided) */
  char *ldesc;          /* long description (multi-line) */
  Category *category;   /* the categories the package belongs to */ 
  Dependency *required; /* the packages required for this package to work */
  actions action;       /* A range of states applicable to this package */
  trusts trust;         /* Selects among info[] below, a subset of action */
  int srcpicked;        /* True if source is required */

  Info *installed;      /* Info on installed package */
  trusts installed_ix;  /* Index into info array for currently installed package */
  excludes exclude;     /* true if this package should be excluded */

  /* The reason for this weird layout is to allow for loops that scan either
     the info array, based on trust value or the infoscan array based on a pointer,
     looking for a particular version. */
  Info info[1];                 /* First element.  Intentionally allocated prior
                                   to infoscan */
  Info infoscan[NTRUST - 1];    /* +1 for TRUST_UNKNOWN */
  Info infoend[0];              /* end marker */
} Package;

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Setup snpshot bug no skip/keep
  2001-11-09  8:16     ` Christopher Faylor
@ 2001-11-09  9:51       ` Brian Keener
  2001-11-01  5:57         ` Robert Collins
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Keener @ 2001-11-09  9:51 UTC (permalink / raw)
  To: cygwin

Christopher Faylor wrote:
> Info *installed;      /* Info on installed package */
>   trusts installed_ix;  /* Index into info array for currently installed package */
>   excludes exclude;     /* true if this package should be excluded */
> 
>   /* The reason for this weird layout is to allow for loops that scan either
>      the info array, based on trust value or the infoscan array based on a pointer,
>      looking for a particular version. */
>   Info info[1];                 /* First element.  Intentionally allocated prior
>                                    to infoscan */
>   Info infoscan[NTRUST - 1];    /* +1 for TRUST_UNKNOWN */
>   Info infoend[0];              /* end marker */
> }
>

Sure I noticed packages are of type info which is itself a structure with all the 
pertinent info.  I also notice that the *installed* structure is a different 
substructure from the selectable packages substructure *info*.  Under a normal 
situation this is not a problem (and probably isn't for you more experienced coders) 
but for me it was.  I will try to explain:  In info we have bucket/slot (probably not 
the right term but go with me here) 0 which is Prev and bucket 1 is Current and 
bucket 2 is Test or something like that and then we have a separate structure for 
installed.  Now when installed is one of Prev, Curr or Test all is wonderful and the 
enum we use to step through the Trusts works great.  But if installed is outdated you 
now get a lot of extraneous code (at least I thought so) because installed is not one 
of Prev, Curr, and Test and yet you want the option to keep the installed available 
just like *keep*ing the Prev, Curr, or Test is available.  In my attempts it was 
tough and created I lot of unnecessary code.  My contention is that the structure 
should be bucket 0 is prev, bucket 1 is current, bucket 2 is test and bucket 3 is 
installed.  Basically have 4 versions instead of 3 and two of them may or may not be 
the same.  This also makes it easier for the actions which are based on the trusts to 
step through prev, curr, test, keep, redownload, reinstall, source, redownload 
sources and reinstall sources and whatever in my opinion.

I am sure you guys handled this no sweat - since I see Robert has posted a fix for 
the skip/keep anyways and I did not mean to imply it was impossible to fix, just 
thought I thought a slight structure change would make it not so cumbersome (with my 
skills).

Now that I have made this long dissertation I hope that it *was* the fact that the 
installed structure was there as well as the info structure.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Setup snpshot bug no skip/keep
  2001-11-01  5:57         ` Robert Collins
@ 2001-11-11  8:26           ` Robert Collins
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Collins @ 2001-11-11  8:26 UTC (permalink / raw)
  To: bkeener, cygwin-apps; +Cc: cygwin

Redirected to cygwin-apps, please followup there.

----- Original Message -----
From: "Brian Keener" <bkeener@thesoftwaresource.com>


> >
>
> Sure I noticed packages are of type info which is itself a structure
with all the
> pertinent info.  I also notice that the *installed* structure is a
different
> substructure from the selectable packages substructure *info*.  Under
a normal
> situation this is not a problem (and probably isn't for you more
experienced coders)
> but for me it was.  I will try to explain:  In info we have
bucket/slot (probably not
> the right term but go with me here) 0 which is Prev and bucket 1 is
Current and
> bucket 2 is Test or something like that and then we have a separate
structure for
> installed.  Now when installed is one of Prev, Curr or Test all is
wonderful and the
> enum we use to step through the Trusts works great.  But if installed
is outdated you
> now get a lot of extraneous code (at least I thought so) because
installed is not one
> of Prev, Curr, and Test and yet you want the option to keep the
installed available
> just like *keep*ing the Prev, Curr, or Test is available.  In my
attempts it was
> tough and created I lot of unnecessary code.  My contention is that
the structure
> should be bucket 0 is prev, bucket 1 is current, bucket 2 is test and
bucket 3 is
> installed.  Basically have 4 versions instead of 3 and two of them may
or may not be
> the same.  This also makes it easier for the actions which are based
on the trusts to

The problem with 4 buckets is that either 1 is a pointer to another or
you have to remember to change 2 whenever you change one. Both of which
will be annoying. When this becomes a bit more oop, this can be made
transparent, and then it will be easier.

The current UNKNOWN bucket, IMO should be used to store the installed
package details IFF it's not listed in setup.ini.

Also local tarballs should be included, and the bucket count should be
dynamic.

> I am sure you guys handled this no sweat - since I see Robert has
posted a fix for
> the skip/keep anyways and I did not mean to imply it was impossible to
fix, just
> thought I thought a slight structure change would make it not so
cumbersome (with my
> skills).

Yah, well my fix was broken, as I found when I tested.

Rob



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2001-11-11 23:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1005263562.1258.ezmlm@sources.redhat.com>
2001-11-09  5:57 ` Setup snpshot bug no skip/keep John P. Rouillard
2001-11-09  6:15   ` Robert Collins
2001-11-09  7:13   ` Brian Keener
2001-11-09  8:16     ` Christopher Faylor
2001-11-09  9:51       ` Brian Keener
2001-11-01  5:57         ` Robert Collins
2001-11-11  8:26           ` Robert Collins

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