[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] Mirroring a subset of a p2 repo
Oh, I've forgot to explain why other mirroring options don't suite me. Mirroring a complete repository is just a waste of resources, especially, given that I may have to mirror several complete repositories and be forced to specify exact versions of certain features in test configuration so that a too-new version from a second repo doesn't overshadow the desired one from the first repo.
On the other hand, listing all required IUs explicitly is quite tedious and I don't want to do this because my features have to work in certain Eclipse configurations, e.g. the baseline is Eclipse Platform 3.6.1 + CDT 7.0, and it additionally has to work in EPP for C/C++ developers 3.7.2 and EPP for C/C++ developers 3.8.0. I might not use all features from these configurations right now, but I want my tests to start failing if I introduce some code, which is incompatible with one of these configurations. Thus, I want to run my unit tests against three different target platforms.
By the way, speaking of using p2 publisher to produce a p2 repo from runnable, I would be happy if I could specify a profile, from which it would produce a p2 repo without loosing any metadata. However, I am not sure if any metadata (e.g., touchpoint instructions) is really lost in the chain (p2 repo) --p2.director--> (runnable) --p2.featuresAndBundlesPublisher--> (p2 repo).
----- Original Message -----
From: "Mikhail Kalkov" <mikhail.kalkov@xxxxxxxxxxxxxx>
To: "P2 developer discussions" <p2-dev@xxxxxxxxxxx>
Sent: Friday, December 14, 2012 11:58:28 AM
Subject: [p2-dev] Mirroring a subset of a p2 repo
I want to mirror a subset of a p2 repo, or to be more precise, to mirror one or more root IUs and all their (transitive) dependencies. The use case is to produce a local p2 repo, which I can use as a target platform for unit testing. p2 director does something very similar, but in addition to downloading the artifacts, it also installs them. PDE Build actually does support runnable eclipse installations as target platforms, but we use Tycho, which only supports p2 repositories as target platforms.
I've tried to use p2 mirror task, but it seems that one has to explicitly include/exclude IU or otherwise everything is mirrored. There is no support for recursively resolving and adding dependencies. On the other hand, p2 director can automatically resolve all the dependencies and download them together with the root IU, but there seem to be no way to skip IU installation.
What I have so far come up with is to first run p2 director to create an installation which includes all the bundles I want and only them, and after it to run p2 features and bundles publisher to create metadata from plugins/ and features/ directories in this installation. However, this looks like a kludge. Does anybody know if there is an easier and better way to achieve my goal? Shall I file an issue to add this function either to p2 mirror or to p2 director? Finally, in general what are advantages and drawbacks of using a p2 repo instead of a runnable installation as a target platform, form p2 point of view?
Purple Scout AB
Address: Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden
Phone: +46 (0) 732 - 051405
p2-dev mailing list