Thanks everyone for your helpful replies.
I have opened an enhancement request to document the requirement and continue
the discussion, for anyone interested.
- Should be able to specify order or priority of artifact repositories
As for two of the questions ...
> Why don't we have mirroring support for things served
I'm not sure I understand the question, but will answer
anyway :) ... the definition of 'archive' is that they are not mirrored.
That's sort of the point. A place to put old stuff that might rarely be
needed, but not needed enough to justify "filling up" all the
> Also rather than changing the repos, why can't we
have http-level redirect for these URLs?
Not sure what problems this might solve, or if feasible,
but probably similar point, is why not just take some locations out of
the mirroring rules. Such as, given our fictional URLs,
Once "3.2.0" is considered old, we could add
a mirror rule to "do not mirror /webtools/R3.2.0/ content". (I
don't think there is a way to specify rules to remove stuff, once mirrored,
other than to literally remove it ... but, not relevant to the crux of
But, I'm not sure what would solve the problem ... the
problem could better be understood, probably, with more fictional examples:
For many bundles (say) each release will have a different version of the
artifact ... so, not too much of a problem here ... what is eventually
matched is probably uniquely required, so will come from where ever it
needs to come from. The problem (the inefficiency) is if there is a bundle,
say bundleA, version 1.0.0.a .. and it stays the same each release. So,
now, that bundle exists in all three artifact repos, and would be nice
to say "give preference to <certain> repositories" while
getting bundleA, version 1.0.0.a. Of course, one bundle is no big deal
... but over thousands of bundles, over many releases, seems likely we
could end up with a lot of "dups" and probably a lot of unnecessary
traffic to 'archive.eclipse.org'.
[Now that I think about it ... perhaps I should be more
explicit ... the (composite) repo that people would be using would be only
... so to some extent, changing the list in the composite file _is_ a type
of http redirection already.]
Hope that helps clarify ... without too much reading ....
but, let's move the discussion to Bug 337790
so issues are captured there.
Pascal Rapicault <pascal@xxxxxxxxxxxx>
P2 developer discussions
02/21/2011 08:23 PM
Are there order effects in composite repositories?
Though it is true that children repos are consulted in
order, this is a not a contract.
Why don't we have mirroring support for things served
Also rather than changing the repos, why can't we have
http-level redirect for these URLs?
On 2011-02-19, at 3:23 AM, Thomas Hallgren wrote:
For the meta-data, order doesn't matter since that would break the whole
idea of using a SAT algorithm to come up with a resolution. p2 will build
a set of all UI's in the repository (composite or not), and then feed that
to the SAT solver. The solver then comes up with a plan. The order of children
doesn't affect the content of the set.
For the artifacts, I know that url's with 'file:' are consulted first so
that unnecessary download traffic is avoided. I'm almost certain that with
the 'file' priority out of the way, the artifact repositories are consulted
in the order they are listed.
On 2011-02-19 08:01, David M Williams wrote:
In particular, is it part of the "spec"
or API? (That is, I'm not just asking about current implementation).
I think this issue will become more relevant, especially for eclipse.org,
now that p2 is getting "old" :) because some repos that
were on 'downloads' should at some point move to 'archives'.
This can become important, for example, if some artifact is the same in
all three repositories .... that is, the version/qualifier is unchanged.
If the "archive" repos are tried first, then the result would
not be mirrored, and always come from eclipse.org
directly, it seems. The opposite would be desired, that 'downloads' repos
would be "searched/matched" first, and if found there, then,
via the magic of the mirrors URL, would have a chance of coming from a
mirror, thus being faster for many users (and off-loading some bandwidth
So, is there a way to make sure 'download' URLs are matched first? Should
they come first in list, or last ... or is the outcome indeterminable?