[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