Bug 216675 - Set repos at build time
Summary: Set repos at build time
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M4   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2008-01-26 13:50 EST by Doug CLA
Modified: 2008-11-07 16:40 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug CLA 2008-01-26 13:50:45 EST
In order to control releases in my RCP application, I set an update policy URL in the .ini file for all users. The URL is set to a location on my web server.

This works fine when my server is up, but when my server went down and users opened the RCP app, the app started downloading the latest releases from the eclipse.org servers!! This can obviously cause issues because the versions might not be compatible with my code.

The behaviour I would have expected was for Eclipse to simply log the fact that the web server could not be contacted and NOT to try to download from anywhere.

Can it be changed to work this way? Or else, is there a way to specify a URL to a plugin directory so that policy.xml can always be found?
Comment 1 Dejan Glozic CLA 2008-01-27 10:47:14 EST
Doug, there is no new work done on the 'classic' Update Manager code base. All new developement is focused on the new and shiny Equinox Provisioning (P2). Let them know about your requirment to ensure it supports your use case.
Comment 2 Doug CLA 2008-01-27 14:54:02 EST
OK - I am changing assignment to Equinox. Will the new Equinox update mechanism will be available in the next major release (Ganymede)? 

Also, do you know if there is a way to specify a URL to a plugin directory so that policy.xml can always be found? This would be a decent workaround until such a time as the new update mechanism is available.

Thanks.

Comment 3 Pascal Rapicault CLA 2008-01-27 15:43:40 EST
p2 should find its way in the SDK for 3.4 M6.

By design this problem will not occur since the IUs (the replacement for features) are not bound to a URL. Instead, updates are being looked for from a repository whose location can be set within your product. Therefore if the repository can not be found, no updates will be found.

Now we just need to make sure that the path to the repo can be specified at build time.

Comment 4 John Arthorne CLA 2008-04-27 23:57:08 EDT
Pascal, what are you hoping to happen here in 3.4? To be backwards compatible we still honor the update and discovery URLs from the feature.xml files.
Comment 5 John Arthorne CLA 2008-11-03 16:02:29 EST
For 3.5 we should add an "add repository" action that would allow an IU to specify a repository URI to be added. This will allow a product writer to control the set of repositories initially available in their application.
Comment 6 John Arthorne CLA 2008-11-07 16:40:40 EST
I have added two new actions: addRepository and removeRepository. New tests are in AddRepositoryActionTests and RemoveRepositoryActionTests. This will allow someone to add a repository in the p2.inf of a bundle. For example, this will add a metadata and artifact repository at http://some.url to the set of known repositories.

instructions.configure=\
  addRepository(location:http://some.url,type:0);\
  addRepository(location:http://some.url,type:1);

Further details are in:

http://wiki.eclipse.org/Equinox/p2/Engine/Touchpoint_Instructions