This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH setup 3/3] Keep track of all known sites for a given version of a package
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: "cygwin-apps at cygwin dot com" <cygwin-apps at cygwin dot com>
- Date: Mon, 9 Jul 2018 19:17:41 +0100
- Subject: Re: [PATCH setup 3/3] Keep track of all known sites for a given version of a package
- References: <20180317145955.4944-1-kbrown@cornell.edu> <20180317145955.4944-4-kbrown@cornell.edu>
On 17/03/2018 14:59, Ken Brown wrote:
When adding a packageversion for an entry in setup.ini, make its
packagesource::sites vector include the sites from previously
processed ini files.
Also remove from the libsolv pool the previous packageversions, so
that libsolv will always find the one that lists all the sites.
Thanks.
I think that this might be better done in packagemeta::add_version() as
you originally proposed, although that does involve moving more things
around.
A couple of patches which replace this one to do that follow.
diff --git a/package_meta.cc b/package_meta.cc
index 7f8110d..89b67bc 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -140,6 +140,14 @@ packagemeta::add_version (packageversion & thepkg, const SolverPool::addPackageD
set <packageversion>::iterator i = versions.find(thepkg);
if (i != versions.end())
{
+ if (pkgdata.reponame != "_installed")
+ {
+ if (curr == *i)
+ curr = thepkg;
+ if (exp == *i)
+ exp = thepkg;
+ i->remove();
+ }
A comment would have been useful here. It took a bit of head scratching
and testing with this removed to understand what this part is doing.