Bug 260082 - Simple configurator computes bundle location incorrectly with base UNC path
Summary: Simple configurator computes bundle location incorrectly with base UNC path
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 207103
  Show dependency tree
 
Reported: 2009-01-06 13:53 EST by John Arthorne CLA
Modified: 2009-01-09 17:26 EST (History)
1 user (show)

See Also:


Attachments
Fix v01 (2.28 KB, patch)
2009-01-06 13:54 EST, John Arthorne CLA
no flags Details | Diff
Fix v02 + test (12.11 KB, patch)
2009-01-08 17:17 EST, John Arthorne CLA
no flags Details | Diff
Same as previous patch, but fixed both copies of BundleInfo (14.20 KB, patch)
2009-01-08 17:18 EST, John Arthorne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2009-01-06 13:53:32 EST
If the platform's base location is a UNC path, SimpleConfiguratorUtils computes bundle locations incorrectly. When converting a relative URI to an absolute URI, it doesn't include the path of the base URI. This prevents the platform from starting when running from a UNC path.
Comment 1 John Arthorne CLA 2009-01-06 13:54:25 EST
Created attachment 121674 [details]
Fix v01
Comment 2 John Arthorne CLA 2009-01-06 13:59:37 EST
There are some test failures with this patch so this fix isn't sufficient.
Comment 3 John Arthorne CLA 2009-01-08 17:17:18 EST
Created attachment 122025 [details]
Fix v02 + test

The previous fix wasn't quite right, because it made bundle install paths absolute. That worked, but will break other scenarios where relative paths are needed.

The bug was really in SimpleConfiguratorUtils#parseLocation, which needs to add the additional '//' when constructing a URL to match the expected behaviour in Java for UNC URIs (see discussion in bug 207103). There was also a bug in BundleInfo#equals, which should be using URIUtil#append rather than URI#resolve.
Comment 4 John Arthorne CLA 2009-01-08 17:18:27 EST
Created attachment 122026 [details]
Same as previous patch, but fixed both copies of BundleInfo
Comment 5 John Arthorne CLA 2009-01-08 17:23:33 EST
Pascal, can you apply the patch from this bug and bug 260084 and make sure all the tests pass on the Mac? I want to make sure I didn't break scenarios that work differently on Mac.
Comment 6 Pascal Rapicault CLA 2009-01-08 23:18:35 EST
All the tests pass with both patches applied
Comment 7 John Arthorne CLA 2009-01-09 17:26:43 EST
Fix released.