This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Problem with packagesource::sites in setup
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-apps <cygwin-apps at cygwin dot com>
- Date: Thu, 15 Mar 2018 17:23:22 -0400
- Subject: Problem with packagesource::sites in setup
I think we're currently mishandling packagesource::sites when several
libsolv repos contain the same version of a package. If I'm not
mistaken, we create a new packageversion pv for each repo, and
pv.source()->sites contains a single site, corresponding to that repo.
So we never take advantage of the fact that we have more than one mirror
(or mirror directory) from which we can potentially obtain an archive
for the package.
I think the way to fix this is to consolidate all the packageversions pv
into a single one, which knows about all the sites.
This could be handled by packagemeta::add_version(). When it replaces
an existing version, it could remove the old one from the pool after
copying the sites information. In order to obtain the sites
information, it would have to be able to query the libsolv pool, so we
would have to internalize repo data as we go along, presumably in the
IniDBBuilderPackage destructor.
Does this sound about right? If so, I'll try to prepare a patch. Or
maybe there's a better/easier way to solve the problem.
Ken