Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346630 - [Tooling] Install latest release runtime can fail in case latest build runtime is already installed
Summary: [Tooling] Install latest release runtime can fail in case latest build runtim...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Demo (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 1.4 RC2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 06:19 EDT by Beyhan Veliev CLA
Modified: 2011-05-23 06:32 EDT (History)
0 users

See Also:
rsternberg: review? (holger.staudacher)


Attachments
fixes the search for "org.eclipse.rap.runtime.sdk.feature.group" (21.24 KB, patch)
2011-05-20 06:36 EDT, Beyhan Veliev CLA
holger.staudacher: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beyhan Veliev CLA 2011-05-20 06:19:48 EDT
Install latest release runtime can fail in case latest stable runtime is already installed. The problem occures because I'm using the IMetadataRepositoryManager to find the latest version of "org.eclipse.rap.runtime.sdk.feature.group". When the latest stable runtime is already installed the IMetadataRepositoryManager caches its p2 repositories. During the search for the latest release version the repositories for latest stable build are also contacted. Therefore, a wrong version is found because usually the latest stable build runtime has a newer version of "org.eclipse.rap.runtime.sdk.feature.group". This cases the runtime installation to fail with the error message "org.eclipse.rap.runtime.sdk.feature.group not found".
Comment 1 Beyhan Veliev CLA 2011-05-20 06:36:15 EDT
Created attachment 196197 [details]
fixes the search for "org.eclipse.rap.runtime.sdk.feature.group"

This patch fixes the way the latest version of "org.eclipse.rap.runtime.sdk.feature.group" is searched. IMetadataRepositoryManager is no more used. Only the selected p2-repository (latest build or latest release) is  searched now. I used IMetadataRepositoryManager because I thought we will have more then one repository for latest release or latest build in the future. Now we created the composite repositories bug 346521 and this no more the case.
Comment 2 Ralf Sternberg CLA 2011-05-21 07:50:27 EDT
Holger, can you please review this patch? Since downloading the runtime from the RAP repositories is a new feature in this release, I think we should include this fix in the next RC - just by its description, I didn't review the code yet.
Comment 3 Holger Staudacher CLA 2011-05-23 06:32:37 EDT
I reviewed the patch and I think we are good to go for it. I added some //$NON-NLS-1$ tags. I also tested the bug and the fix. It's also good that you created the tests Beyhan ;).

I committed the changes to CVS HEAD and the 1.4 maintenance branch.