Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Message-ID: <03cb01c1010e$6d809dc0$806410ac@local> From: "Robert Collins" To: , References: <20010629114004 DOT A6990 AT redhat DOT com> <20010629172912 DOT A8991 AT redhat DOT com> <032001c100fe$d62310c0$806410ac AT local> <20010629205735 DOT K9607 AT redhat DOT com> <034701c10106$34f6b6e0$806410ac AT local> <036501c10108$b55383c0$806410ac AT local> <20010629221309 DOT A11334 AT redhat DOT com> <038301c1010a$bab7e840$806410ac AT local> <039201c1010b$856f0c80$806410ac AT local> <20010629223227 DOT C11334 AT redhat DOT com> Subject: Re: hierarchy in setup (category stuff) Date: Sat, 30 Jun 2001 12:43:20 +1000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_03C8_01C10162.3E540100" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-OriginalArrivalTime: 30 Jun 2001 02:30:57.0933 (UTC) FILETIME=[B1EBA3D0:01C1010C] 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" To: ; 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--