Community
Participate
Working Groups
Build Identifier: M20091008-1320 (version 3.4.2.R342_v20090122-9I96EiWElHi8lheoJKJIvhM3JfVsYbRrgVIWL) I am running a p2 director applicaion to install a feature with the higher version. I tried to pass -version to the command line. But it fails either I pass the version or not Reproducible: Always Steps to Reproduce: 1. Install the feature with version 1.0.0 using the cmd line application 2. Create a feature with metadata with the higher version 1.0.1. 3. Attempt to run the p2 director application to install the feature with the higher version. It returns the code 13. In the log file I see this: Command-line arguments: -application org.eclipse.equinox.p2.director.app.application -metadataRepository file:/D:/Temp/patternTemp/ -artifactRepository file:/D:/Temp/patternTemp/ -installIU MyAddressBookPatternFeature.feature.group -version 1.0.1 -destination <Product instll root> -profile <profile name> !ENTRY org.eclipse.equinox.p2.director 4 0 2010-09-09 15:04:26.453 !MESSAGE Problems resolving provisioning plan. ... !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-09 16:51:13.609 !MESSAGE No solution found because the problem in C:\Temp\p2Encoding3310188368310307297.opb is unsatisfiable. !ENTRY org.eclipse.equinox.p2.director 4 1 2010-09-09 16:51:53.062 !MESSAGE Cannot complete the install because some dependencies are not satisfiableand many other lines of unresolved dependencies. And there are namy other messages that seems to be referencing the older version of the plugin.
3.4.x is no longer maintained. Please use to 3.6.
I will investigate.
Created attachment 178613 [details] test data This is reproducible with the attached test data and a simple 3.4.2 zip. Steps: - install and run 3.4.2, then exit - extract test data - run command [1] to install the first version of the feature - check bundles.info, etc and note it was installed successfully - run same command but pointing to 2nd version of feature - feature is not installed and you get an error like [2] [1] java -cp ./plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar org.eclipse.equinox.launcher.Main -application org.eclipse.equinox.p2.director.app.application -metadataRepository file:/Users/equinox/v1 -artifactRepository file:/Users/equinox/v1 -installIU f.feature.group -destination /Users/equinox/Downloads/eclipse -profile SDKProfile -consoleLog -vmArgs -Declipse.p2.data.area=/Users/equinox/Downloads/eclipse/p2 [2] !ENTRY org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:49.791 !MESSAGE Problems resolving provisioning plan. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:49.791 !MESSAGE No solution found because the problem in /var/folders/HB/HBfEMTjGG2yPXnbiNibwKE+++TI/-Tmp-/p2Encoding6578359989882621487.opb is unsatisfiable. Installation failed. !ENTRY org.eclipse.equinox.p2.director 4 1 2010-09-10 10:17:58.015 !MESSAGE Cannot complete the install because some dependencies are not satisfiable !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.015 !MESSAGE Cannot find a solution where both "f.feature.jar [2.0.0]" and "f.feature.jar [1.0.0]" are satisfied. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.015 !MESSAGE Cannot find a solution where both "f.feature.jar [2.0.0]" and "f.feature.jar [1.0.0]" are satisfied. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.015 !MESSAGE Cannot find a solution where both "f.feature.jar [2.0.0]" and "f.feature.jar [1.0.0]" are satisfied. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.016 !MESSAGE Cannot find a solution where both "f.feature.jar [2.0.0]" and "f.feature.jar [1.0.0]" are satisfied. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.016 !MESSAGE Cannot find a solution where both "f.feature.jar [2.0.0]" and "f.feature.jar [1.0.0]" are satisfied. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.016 !MESSAGE Cannot find a solution where both "f.feature.jar [2.0.0]" and "f.feature.jar [1.0.0]" are satisfied. !SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2010-09-10 10:17:58.016 !MESSAGE Unsatisfied dependency: [f.feature.group 1.0.0] requiredCapability: org.eclipse.equinox.p2.iu/f.feature.jar/[1.0.0,1.0.0]
See also bug 279659.
Created attachment 178649 [details] patch Here is a first attempt. In my initial test it worked ok but I haven't tested the big scenario yet. Also it still needs to be reviewed and the risk discussed.
Created attachment 178651 [details] patch Fixed typo in previous patch.
Created attachment 178654 [details] patched JAR Here is a patched JAR if you would like to try it in your scenario to see if it fixes your specific problem.
Created attachment 178657 [details] patch Slightly updated patch.
User comments: - installed v1 ok - installed v2 ok (detected update) - uninstalled v2 ok - tried to install v1 but v2 was installed instead
Cancel last comment. User didn't specify the version when they tried to install v1 the second time so p2 expectedly picked the highest available version. (v2 - the v2 repository was still in the list of known repositories from its initial install)
Created attachment 178878 [details] patch Updated version of the patch with minor comment changes, etc. Also updated the bundle version in the manifest.
Released latest patch to maintenance branch. Closing.