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

Bug 347660

Summary: [fwkAdmin] Simple configurator manipulator doesn't respect org.eclipse.equinox.simpleconfigurator.configUrl property
Product: [Eclipse Project] Equinox Reporter: Katya Stoycheva <katya.stoycheva>
Component: p2Assignee: Katya Stoycheva <katya.stoycheva>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, pascal, pwebster, s.yousouf
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Katya Stoycheva CLA 2011-05-30 10:57:54 EDT
Build Identifier: Any

Simple configurator manipulator ignores the value of org.eclipse.equinox.simpleconfigurator.configUrl property and uses default URL (appending "org.eclipse.equinox.simpleconfigurator/bundles.info" to the  configuration area)

Reproducible: Always

Steps to Reproduce:
1.Download Eclipse
2. Move configuration/org.eclipse.equinox.simpleconfigurator/bundles.info file to Eclipse's root
3. Edit configuration/config.ini configurator URL to point to the new location.
4. Start Eclipse  (new location is respected)
5. Install a random feature via "Install new software" wizard
6. Apply the changes
7. Note that new bundles.info is created at the old location containing only the new feature.
Comment 1 Pascal Rapicault CLA 2011-05-30 23:46:50 EDT
I'm not sure if the pb is in the eclipse touchpoint or in fwk admin.
You may be able to quickly rule out or confirm a bug in fwk admin (or simpleconfigurator.manipulator) by  adding a test to org.eclipse.equinox.frameworkadmin.test bundle that simply starts from your setup (with the modified ini files, etc.) and see what happens at load time.

Also I suppose that you verified the path to the file is properly relativized from the configuration area.

One final note, if the bug was in fwkadmin and friends, note that the tests don't have a great coverage of the code.
Comment 2 Katya Stoycheva CLA 2011-06-01 12:02:33 EDT
Thank you for the pointers. As far as I've seen Eclipse touchpoint registers configurator manipulator in fwk admin which to be used when saving bundles.info. But neither the touchpoint nor the fwk admin are responsible for finding the proper location where bundles.info should be saved.

From my point of view the problem comes from that part of code in SimpleConfiguratorManipulatorImpl.getConfigFile():
File configuratorFolder = new File(baseDir,                 SimpleConfiguratorManipulatorImpl.CONFIGURATOR_FOLDER);
		File targetFile = new File(configuratorFolder, SimpleConfiguratorManipulatorImpl.CONFIG_LIST);

You may see that bundles.info location is tightly bound to configuration location so you cannot just put the file wherever you want and configure org.eclipse.equinox.simpleconfigurator.configUrl to point the new location. 
This behavior causes inconveniences - in Virgo for example we consider having bundles.info outside the configuration folder or having multiple bundles.info files - none of these could be done currently.

On the other hand there is also inconsistency between reading and writing of bundles.info file since both simple configurator and simple configurator manipulator have different ways of getting the file.

Here is how simple configurator discovers it:
SimpleConfiguratorImpl.getConfigurationURL():
String specifiedURL = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_CONFIGURL);
		if (specifiedURL == null)
			specifiedURL = "file:" + SimpleConfiguratorConstants.CONFIGURATOR_FOLDER + "/" + SimpleConfiguratorConstants.CONFIG_LIST;

From my point of view the latter approach is better - it's more understandable and it's clearer(there is no hidden "coupling" to osgi configuration folder).
So simple configurator maipulator using the same method or at least the same logic as simple configurator is the change I would like to propose. 

What do you think?
Comment 3 Pascal Rapicault CLA 2011-06-07 12:21:52 EDT
I agree with the proposed fix.
Comment 4 Eclipse Genie CLA 2019-04-01 14:06:13 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Lars Vogel CLA 2019-10-09 07:03:20 EDT
This bug was marked as stalebug a while ago. Marking as wontfix.

If this report is still relevant for the current release, please
reopen and remove the stalebug whiteboard tag.