Mail Archives: cygwin-developers/2001/06/29/22:41:09
This is a multi-part message in MIME format.
------=_NextPart_000_03C8_01C10162.3E540100
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
----- Original Message -----
From: "Christopher Faylor" <cgf AT redhat DOT com>
To: <cygwin-developers AT cygwin DOT com>; <cygwin-patches AT cygwin DOT com>
Sent: Saturday, June 30, 2001 12:32 PM
Subject: Re: hierarchy in setup (category stuff)
> On Sat, Jun 30, 2001 at 12:22:32PM +1000, Robert Collins wrote:
> >Applying this should fix my boo boo.
>
> Sorry, but there is more to my changes than that. I'm going through now
and
> fixing what I can. I'm also resurrecting Michael's white space changes.
>
> cgf
I think this gets them all. I thought I'd not trashed Michael's whate space
changes - although where code moved between functions, they would have been
lost regardless.
I'm happy if rolling back is easier for you, but I suspect that its the same
effort either way.
Rob
------=_NextPart_000_03C8_01C10162.3E540100
Content-Type: application/octet-stream;
name="oops.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="oops.patch"
Index: choose.cc=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/src/src/winsup/cinstall/choose.cc,v=0A=
retrieving revision 2.36=0A=
diff -u -p -r2.36 choose.cc=0A=
--- choose.cc 2001/06/30 01:37:55 2.36=0A=
+++ choose.cc 2001/06/30 02:40:11=0A=
@@ -100,9 +100,11 @@ isinstalled (Package *pkg, int trust)=0A=
static void=0A=
set_action (Package *pkg, bool preinc)=0A=
{=0A=
- pkg->srcpicked =3D 0;=0A=
if (!pkg->action || preinc)=0A=
- ((int) pkg->action)++;=0A=
+ {=0A=
+ ((int) pkg->action)++;=0A=
+ pkg->srcpicked =3D 0;=0A=
+ }=0A=
=0A=
/* Exercise the action state machine. */=0A=
for (;; ((int) pkg->action)++)=0A=
@@ -145,21 +147,28 @@ set_action (Package *pkg, bool preinc)=0A=
case ACTION_UNINSTALL:=0A=
if (pkg->installed)=0A=
return;=0A=
+ break;=0A=
case ACTION_REDO:=0A=
- if (pkg->installed)=0A=
+ if (pkg->installed && pkg->info[pkg->installed_ix].install_exists)=0A=
{=0A=
pkg->trust =3D pkg->installed_ix;=0A=
return;=0A=
}=0A=
+ break;=0A=
case ACTION_SRC_ONLY:=0A=
- if (pkg->installed && pkg->installed->source_exists)=0A=
- return;=0A=
+ if (pkg->info[pkg->trust].source_exists)=0A=
+ {=0A=
+ pkg->srcpicked =3D 1;=0A=
+ return;=0A=
+ }=0A=
break;=0A=
case ACTION_SAME_LAST:=0A=
pkg->action =3D ACTION_SKIP;=0A=
/* Fall through intentionally */=0A=
case ACTION_SKIP:=0A=
- return;=0A=
+ if (!pkg->installed || =
!pkg->info[pkg->installed_ix].install_exists)=0A=
+ return;=0A=
+ break;=0A=
default:=0A=
log (0, "should never get here %d\n", pkg->action);=0A=
}=0A=
@@ -1461,24 +1470,25 @@ do_choose (HINSTANCE h)=0A=
: "unknown");=0A=
const char *excluded =3D (pkg->exclude ? "yes" : "no");=0A=
=0A=
- log (LOG_BABBLE, "[%s] action=3D%s trust=3D%s installed=3D%s =
excluded=3D%s src?=3D%s"=0A=
+ log (LOG_BABBLE, =0A=
+ "[%s] action=3D%s trust=3D%s installed=3D%s excluded=3D%s src?=3D%s"=0A=
"category=3D%s",=0A=
pkg->name, action, trust, installed,=0A=
- excluded, pkg->srcpicked ? "yes" : "no", pkg->category);=0A=
+ excluded, pkg->srcpicked ? "yes" : "no", pkg->category->name);=0A=
for (int t =3D 1; t < NTRUST; t++)=0A=
{=0A=
if (pkg->info[t].install)=0A=
- log (LOG_BABBLE, " [%s] ver=3D%s\r\n"=0A=
- " inst=3D%s %d exists=3D%s\r\n"=0A=
- " src=3D%s %d exists=3D%s",=0A=
+ log (LOG_BABBLE, " [%s] ver=3D%s\n"=0A=
+ " inst=3D%s %d exists=3D%s\n"=0A=
+ " src=3D%s %d exists=3D%s",=0A=
infos[t],=0A=
pkg->info[t].version ?: "(none)",=0A=
pkg->info[t].install ?: "(none)",=0A=
pkg->info[t].install_size,=0A=
- (pkg->info[t].install_exists) ? "yes":"no",=0A=
+ (pkg->info[t].install_exists) ? "yes" : "no",=0A=
pkg->info[t].source ?: "(none)",=0A=
pkg->info[t].source_size,=0A=
- (pkg->info[t].source_exists =3D=3D 1) ? "yes":"no");=0A=
+ (pkg->info[t].source_exists) ? "yes" : "no");=0A=
}=0A=
}=0A=
}=0A=
------=_NextPart_000_03C8_01C10162.3E540100--
- Raw text -