[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] [p2] How to use director/mirror app against an RCP as p2 repo

Thanks Carsten, that's a good hint.
So I tried to use the profile directory, and it's encouraging: I can list its content and install them in another IDE. So there is definitely everything necessary in it to use p2 director or p2 mirror.
However, I've tried using CLI:
```
mistria@mistria-rh:~/sandbox/mirror$ ~/eclipse/eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source file:/home/mistria/git/org.eclipse.epp.packages/packages/org.eclipse.epp.package._javascript_.product/target/products/epp.package._javascript_/linux/gtk/x86/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package._javascript_.profile/ -destination $(pwd)
```
Fails with
```
!MESSAGE Application error
!STACK 1
org.eclipse.equinox.p2.core.ProvisionException: No repository found at file:/home/mistria/git/org.eclipse.epp.packages/packages/org.eclipse.epp.package._javascript_.product/target/products/epp.package._javascript_/linux/gtk/x86/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package._javascript_.profile/.
ÂÂÂ at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:395)
ÂÂÂ at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:692)
ÂÂÂ at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:104)
ÂÂÂ at org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication.addRepository(AbstractApplication.java:147)
ÂÂÂ at org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication.initializeRepos(AbstractApplication.java:119)
ÂÂÂ at org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication.run(MirrorApplication.java:189)
ÂÂÂ at org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication.start(MirrorApplication.java:85)
ÂÂÂ at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
```

and

```
mistria@mistria-rh:~/sandbox/mirror$ ~/eclipse/eclipse -application org.eclipse.equinox.p2.director -repository file:/home/mistria/git/org.eclipse.epp.packages/packages/org.eclipse.epp.package._javascript_.product/target/products/epp.package._javascript_/linux/gtk/x86/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package._javascript_.profile/ -destination $(pwd) -installIU org.eclipse.core.runtime
```
(using director instead of mirror) fails with
```
!ENTRY org.eclipse.equinox.p2.artifact.repository 4 1000 2017-06-26 20:30:51.793
!MESSAGE No repository found at file:/home/mistria/git/org.eclipse.epp.packages/packages/org.eclipse.epp.package._javascript_.product/target/products/epp.package._javascript_/linux/gtk/x86/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package._javascript_.profile/.

!ENTRY org.eclipse.equinox.p2.core 4 0 2017-06-26 20:30:52.716
!MESSAGE Unable to load repositories.
```

I share Roland's analysis there. It looks like the profile directory is a good IMetadataRepository, but not a viable IArtifactRepsitory. p2 UI seems to have some magic make a p2 repo out of this profile directory. I'll need to investigate what this magic is.

I'll keep you posted.