Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332971

Summary: [reconciler] Provide mechanism for specifying multiple non-default drop-ins folders
Product: [Eclipse Project] Equinox Reporter: DJ Houghton <dj.houghton>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: hollisc, stephen.francisco, tjwatson
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 334160    
Attachments:
Description Flags
patch none

Description DJ Houghton CLA 2010-12-20 14:04:06 EST
Currently the user is allowed to specify a System property - org.eclipse.equinox.p2.reconciler.dropins.directory - which points to a location that we will treat as a drop-ins folder. We have had cases where it would be useful to allow the user to specify multiple locations. 

We talked about allowing the property to hold a list of folders but this is hard because the framework currently does not support cascaded System property merging and if we were to change this, changes would have to occur at many levels. (exe, launcher jar, etc)

Tom and I talked briefly about somehow leveraging the links files to do this. And John suggested allowing for variable substitution in the links files, something like:
   path=%company.web.dropins%/web-group
and when we process it, we would look for a "company.web.dropins" System property to do the substitution. 

This would allow the user or product to have multiple link files and drop-ins folders if they wanted.
Comment 1 Steve Francisco CLA 2011-01-04 14:52:37 EST
if done for 3.7, is this something that could be ported back to 3.6.2 or would it be considered new API?
Comment 2 DJ Houghton CLA 2011-01-05 10:13:12 EST
Depending on the complexity of the implementation, this could potentially be back-ported.
Comment 3 DJ Houghton CLA 2011-01-07 15:19:57 EST
Created attachment 186313 [details]
patch

First cut at a patch. It allows variable substitution for paths in .link files as well as in the "org.eclipse.equinox.p2.reconciler.dropins.directory" system property. 

Variables appear in the form: %key%

Values are taken from the system properties for the running instance. (BundleContext.getProperty(key)).
Comment 4 DJ Houghton CLA 2011-01-12 14:47:32 EST
Released to HEAD.