public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Problem with packagesource::sites in setup
@ 2018-03-15 21:23 Ken Brown
  2018-03-15 22:07 ` Jon Turney
  2018-03-16 19:36 ` Achim Gratz
  0 siblings, 2 replies; 6+ messages in thread
From: Ken Brown @ 2018-03-15 21:23 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-17 14:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 21:23 Problem with packagesource::sites in setup Ken Brown
2018-03-15 22:07 ` Jon Turney
2018-03-16  2:42   ` Ken Brown
2018-03-16 11:45     ` Ken Brown
2018-03-17 14:59       ` Ken Brown
2018-03-16 19:36 ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).