Community
Participate
Working Groups
Build Identifier: I20100608-0911 Using the Director application to install an IU, will convert a relative path for the -configuration argument in the launcher.ini file into an absolute path. Probably the call EclipseLauncherParser#getConfigurationLocation, where a relative path is converted into an absolute path, causes this behavior. The absolute path URI, written into the launcher.ini, is invalid. It states 'file:/D:/dev/myapp/conf' instead of 'file:///D:/dev/myapp/conf' Usually, using the director should not nail the installation at the current folder, by converting relative paths into absolute ones, preventing the app to be moved to another location without altering the INI-files. Reproducible: Always Steps to Reproduce: 1. Extract an Eclipse SDK 3.6 2. Rename the configuration folder into my.conf 3. Add the following lines to the eclipse.ini file: -configuration my.conf 4. invoke the director application to install a plugin or a feature.group, e.g. the org.eclipse.equinox.executable.feature.group, into the SDK, using the batch attached to this bug entry 5. Inspect the eclipse.ini and check the value for the -configuration parameter
Created attachment 174470 [details] Batch file to install the RCP Delta pack into the SDK Copy the batch into the root folder of an extracted Eclipse SDK, e.g. 'D:\dev\eclipse', and run it on a computer with internet access to download the bundles from the Helios P2 Repos.
(In reply to comment #0) > The absolute path URI, written into the launcher.ini, is invalid. It states > 'file:/D:/dev/myapp/conf' > instead of > 'file:///D:/dev/myapp/conf' > Why do you consider the first one invalid?
As a URL pointing to a file begins with 'file://', followed by a path. Starting from root, the path must start with a '/', resulting in file:///D:/dev/eclipse/my.conf' For further information see RFC1738, 3.10 FILES http://www.rfc-editor.org/rfc/rfc1738.txt Regards, Stefan
I know that the spec says that a file URL should be in the form file:// but in practice, the // can be omitted in most cases (see http://en.wikipedia.org/wiki/File_URI_scheme). The reason I ask is that I wonder how this is relevant to the absolute versus relative path problem. Do you actually experience a problem due to the lacking '//' ?
No, the missing '//' isn't really part of the problem, I guess. But when writing the configuration back to the INI file, it seems that a 'makeRelative' call takes place before writing the path to the INI file. I haven't debugged that yet, but a possible cause for the relative->absolute problem might be, that the 'makeAbsolute' and 'makeRelative' calls have different expectations concerning the amount of slashes. But thats just a suspicion.
I just finished the debug session. The '/'-count isn't the bug. In 'EclipseLauncherParser.setConfigurationLocation(List, URI, LauncherData) line: 233' the value for property EquinoxConstants.OPTION_CONFIGURATION is set only, if the current value is null. But when modifying an existing value, the property is always set, and the value is always an absolute path. If the check for "null" was removed, the proper relative path would be set, but this would overwrite a possibly existing absolute value with a relative one. A fix would possibly require to remember whether the initial value was relative or absolute from the start.
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.
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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.