Setup patch to keep test version if test version installed
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Jan 27 20:59:00 GMT 2015
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20150127/3f22ab3b/attachment.sig>
More information about the Cygwin-apps
mailing list