[PATCH setup 3/3] Keep track of all known sites for a given version of a package
Ken Brown
kbrown@cornell.edu
Tue Jul 10 16:12:00 GMT 2018
On 7/9/2018 2:17 PM, Jon Turney wrote:
> 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.
I agree that your approach (or my original approach?) is better. I'm
not sure why I gave up on it.
>> 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.
Sorry about that. I remember that it took me several tries to get it
right, and then I didn't think to document it.
Ken
More information about the Cygwin-apps
mailing list