This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setup patch to keep test version if test version installed


On Jan 27 21:37, Corinna Vinschen wrote:
> On Jan 27 20:59, Achim Gratz wrote:
> > Corinna Vinschen writes:
> > > Example?  I just tried the libppl and libmpc1 packages, and they simply
> > > don;'t show up anymore, neither in the current setup 2.859, nor ithe
> > > test setup 2.861.  I don't see a difference in behaviour.
> > 
> > You have to use the -o / --delete-orphans option for this to kick in.
> > It should still work in 2.859 or at least it did for me.  This trustp
> > business in setup is a bit annoying and intransparent, but I'll figure
> > out how to fix it again.
> 
> I think I see why this happens.  I'll have a closer look tomorrow.

Or today.  Can you try this patch?  Most of it is a bit of reformatting,
the importnat part is the last set_action call.

Index: choose.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/choose.cc,v
retrieving revision 2.169
diff -u -p -r2.169 choose.cc
--- choose.cc	26 Jan 2015 21:05:45 -0000	2.169
+++ choose.cc	27 Jan 2015 20:58:17 -0000
@@ -252,19 +252,23 @@ ChooserPage::OnInit ()
       bool deleted   = pkg.isManuallyDeleted();
       bool basemisc  = (pkg.categories.find ("Base") != pkg.categories.end ()
 		     || pkg.categories.find ("Misc") != pkg.categories.end ());
-      bool current   = pkg.curr || CleanOrphansOption;
-      bool upgrade   =  wanted  || (!pkg.installed && basemisc) || UpgradeAlsoOption || !hasManualSelections;
+      bool upgrade   =  wanted  || (!pkg.installed && basemisc)
+			|| UpgradeAlsoOption || !hasManualSelections;
       bool install   =   wanted  && !deleted && !pkg.installed;
       bool reinstall =  (wanted  || basemisc ) && deleted;
       bool uninstall = !(wanted  || basemisc ) && deleted;
       if (install)
-	pkg.set_action( packagemeta::Install_action, pkg.curr );
+	pkg.set_action (packagemeta::Install_action, pkg.curr);
       else if (reinstall)
-	pkg.set_action( packagemeta::Reinstall_action, pkg.curr );
+	pkg.set_action (packagemeta::Reinstall_action, pkg.curr);
       else if (uninstall)
-	pkg.set_action( packagemeta::Uninstall_action, packageversion() );
+	pkg.set_action (packagemeta::Uninstall_action, packageversion ());
       else
-	pkg.set_action( packagemeta::Default_action, ((upgrade && current) ? pkg.trustp (true,  TRUST_UNKNOWN) : pkg.installed) );
+	pkg.set_action (packagemeta::Default_action,
+			(upgrade && pkg.curr)
+			? pkg.trustp (true,  TRUST_UNKNOWN)
+			: (!pkg.curr && CleanOrphansOption)
+			  ? pkg.curr : pkg.installed);
     }
 
   ClearBusy ();


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpIm3sUnO6rf.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]