my goal is to build a product with Tycho and update it via p2.console. I started with the example project
http://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application. Updating works fine via the UI as described. Now I want to update via p2 console. The following three cases updating product/feature/bundle fail. Afterwards I describe 3 workarounds. I do not
like the workarounds as final solution though and would like to know how it should be done right.
Cheers,
Martin
1.
Updating product fails
osgi> provlp DefaultProfile
a.jre.javase 1.6.0
com.ibm.icu 4.2.1.v20100412
config.a.jre.javase 1.6.0
example-bundle 0.1.0.201402180854
example-feature.feature.group 0.1.0.201402180854
example-feature.feature.jar 0.1.0.201402180854
example-feature_root 0.1.0.201402180854
example-feature_root.cocoa.macosx.x86_64 0.1.0.201402180854
example.product.id 0.1.0.201402180854
[…]
osgi> provremove
example.product.id 0.1.0.201402180854
Remove complete for example.product.id 0.1.0.201402180854
osgi> provlp DefaultProfile
osgi> confapply
Config URL not set.
osgi> provinstall example.product.id 0.2.0.201402180911
Installation failed for example.product.id 0.2.0.201402180911
Software being installed: Example Product 0.2.0.201402180911 (example.product.id 0.2.0.201402180911)
Missing requirement: Equinox Provisioning Platform Update Support 1.0.100.v20100513 (org.eclipse.equinox.p2.ui.sdk 1.0.100.v20100513) requires 'bundle org.eclipse.compare 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Example Product 0.2.0.201402180911 (example.product.id 0.2.0.201402180911)
To: org.eclipse.equinox.p2.user.ui.feature.group [2.0.1.r361_v20100903-897HFa-FX0z-z-ntoaavz0JPX628]
Cannot satisfy dependency:
From: Equinox p2 Provisioning 2.0.1.r361_v20100903-897HFa-FX0z-z-ntoaavz0JPX628 (org.eclipse.equinox.p2.user.ui.feature.group 2.0.1.r361_v20100903-897HFa-FX0z-z-ntoaavz0JPX628)
To: org.eclipse.equinox.p2.ui.sdk [1.0.100.v20100513]
2.
Updating feature fails
osgi> provlp DefaultProfile
a.jre.javase 1.6.0
com.ibm.icu 4.2.1.v20100412
config.a.jre.javase 1.6.0
example-bundle 0.1.0.201402180854
example-feature.feature.group 0.1.0.201402180854
[...]
osgi> provremove example-feature.feature.group 0.1.0.201402180854
Remove complete for example-feature.feature.group 0.1.0.201402180854
osgi> confapply
osgi> provinstall example-feature.feature.group 0.2.0.201402180911
Installation failed for example-feature.feature.group 0.2.0.201402180911
Software being installed: Example Feature 0.2.0.201402180911 (example-feature.feature.group 0.2.0.201402180911)
Software currently installed: Example Product 0.1.0.201402180854 (example.product.id 0.1.0.201402180854)
Only one of the following can be installed at once:
Example Feature 0.1.0.201402180854 (example-feature.feature.jar 0.1.0.201402180854)
Example Feature 0.2.0.201402180911 (example-feature.feature.jar 0.2.0.201402180911)
Cannot satisfy dependency:
From: Example Feature 0.1.0.201402180854 (example-feature.feature.group 0.1.0.201402180854)
To: example-feature.feature.jar [0.1.0.201402180854]
Cannot satisfy dependency:
From: Example Feature 0.2.0.201402180911 (example-feature.feature.group 0.2.0.201402180911)
To: example-feature.feature.jar [0.2.0.201402180911]
Cannot satisfy dependency:
From: Example Product 0.1.0.201402180854 (example.product.id 0.1.0.201402180854)
To: example-feature.feature.group [0.1.0.201402180854]
osgi> provlp DefaultProfile
a.jre.javase 1.6.0
com.ibm.icu 4.2.1.v20100412
config.a.jre.javase 1.6.0
example-bundle 0.1.0.201402180854
example-feature.feature.group 0.1.0.201402180854
[...]
3.
Updating single bundle fails
osgi> provlp DefaultProfile
a.jre.javase 1.6.0
com.ibm.icu 4.2.1.v20100412
config.a.jre.javase 1.6.0
example-bundle 0.1.0.201402180854
[...]
osgi> provremove example-bundle 0.1.0.201402180854
Remove complete for example-bundle 0.1.0.201402180854
osgi> provlp DefaultProfile
a.jre.javase 1.6.0
com.ibm.icu 4.2.1.v20100412
config.a.jre.javase 1.6.0
example-bundle 0.1.0.201402180854
[...]
osgi> provinstall example-bundle 0.2.0.201402180911
Installation failed for example-bundle 0.2.0.201402180911
Software being installed: Bundle 0.2.0.201402180911 (example-bundle 0.2.0.201402180911)
Software currently installed: Example Product 0.1.0.201402180854 (example.product.id 0.1.0.201402180854)
Only one of the following can be installed at once:
Bundle 0.1.0.201402180854 (example-bundle 0.1.0.201402180854)
Bundle 0.2.0.201402180911 (example-bundle 0.2.0.201402180911)
Cannot satisfy dependency:
From: Example Feature 0.1.0.201402180854 (example-feature.feature.group 0.1.0.201402180854)
To: example-bundle [0.1.0.201402180854]
Cannot satisfy dependency:
From: Example Product 0.1.0.201402180854 (example.product.id 0.1.0.201402180854)
To: example-feature.feature.group [0.1.0.201402180854]
I found the following three workarounds, which however are not satisfying as a final solution.
1.
Update via the UI as described above.
2.
Build the product without the feature. Install it on the p2.console afterwards. Updating works.
osgi> provaddrepo file:/Users/me/Desktop/itp04-rcp_example-feature-2_0.2.0_2/eclipse-repository/target/repository
osgi> provlg
example-feature-2.feature.group 0.2.0.201402181014
example-feature.feature.group 0.1.0.201402181014
example.product.id 0.1.0.201402181014
org.eclipse.equinox.p2.user.ui.feature.group 2.0.1.r361_v20100903-897HFa-FX0z-z-ntoaavz0JPX628
org.eclipse.rcp.feature.group 3.6.2.r362_v20101104-9SAxFMKFkSAqi8axkv1ZjegmiBLY
osgi> provinstall example-feature-2.feature.group 0.2.0.201402181014
Installation complete for example-feature-2.feature.group 0.2.0.201402181014
osgi> provaddrepo file:/Users/me/Desktop/itp04-rcp_example-feature-2_0.3.0/eclipse-repository/target/repository
osgi> provlg
example-feature-2.feature.group 0.2.0.201402181014
example-feature-2.feature.group 0.3.0.201402181020
example-feature.feature.group 0.1.0.201402181014
example-feature.feature.group 0.1.0.201402181020
example.product.id 0.1.0.201402181014
example.product.id 0.1.0.201402181020
org.eclipse.equinox.p2.user.ui.feature.group 2.0.1.r361_v20100903-897HFa-FX0z-z-ntoaavz0JPX628
org.eclipse.rcp.feature.group 3.6.2.r362_v20101104-9SAxFMKFkSAqi8axkv1ZjegmiBLY
osgi> provremove example-feature-2.feature.group 0.2.0.201402181014
Remove complete for example-feature-2.feature.group 0.2.0.201402181014
osgi> provinstall example-feature-2.feature.group 0.3.0.201402181020
Installation complete for example-feature-2.feature.group 0.3.0.201402181020
osgi> provlp DefaultProfile
a.jre.javase 1.6.0
com.ibm.icu 4.2.1.v20100412
config.a.jre.javase 1.6.0
example-bundle 0.1.0.201402181014
example-feature-2.feature.group 0.3.0.201402181020
example-feature-2.feature.jar 0.3.0.201402181020
example-feature.feature.group 0.1.0.201402181014
example-feature.feature.jar 0.1.0.201402181014
[...]
3.
There are tooling* entries in the profile (osgi> provlp DefaultProfile) that seem to be generated by Tycho and cause problems for updating via p2 console. I removed them by
editing the newest profile in p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProfile.profile with the following 2 steps. Then updating works.
·
Remove from <unit id='toolingexample.product.id.configuration’> the <required name=’tooling*’> entries referencing my bundles with tooling* prefix and
·
Remove from <unit id='example.product.id'> my feature