In my 3.7 rcp application I use p2 for headless installation/update of plugins
at startup.
Recently, customers complain about inconsistent application environment : application crashes with famous log ('Application "myapp" counld not be found in the registry. The applications available are....').
The reason is that the main udpated jar of my application is corrupted : its size and content are invalid.
My guess is that it's due to client network failures during update.
1) How could I indicate that the application should start with previous correct installation? How could the last update be reverted ?
2) Is it possible to parameterize p2 so that it first :
- download updates in another directory than the current application folder/sub-folders
- check consistency of downloaded artifact
- install new version
I think you hit the nail on the head when you pointed out md5 checksum presence in #2.
Indeed, almost every dependent plug-ins are described with a 'download.md5' property in the 'artifacts.xml' file (extracted from artifacts.jar), except my specific application' jars.
The p2 repository is created by using eclipse product export, and so are my application's jar.
What has to be done in order to add the md5 sums information during this process ?
Have I to manually change the content of the 'artifacts.xml' file after its generation and after having generated checksums (Checksum Ant task for example) for these jars ?