Bug 97388 - Duplicate entries in Update Manger when using *.link files
Summary: Duplicate entries in Update Manger when using *.link files
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: Platform-Update-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 97942 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-31 02:41 EDT by Dmitry Shport CLA
Modified: 2005-06-02 15:38 EDT (History)
3 users (show)

See Also:


Attachments
patch for org.eclipse.update.configurator (6.18 KB, patch)
2005-05-31 15:12 EDT, Rafael Chaves CLA
no flags Details | Diff
org.eclipse.update.configurator_3.1.0.jar (88.76 KB, application/jar)
2005-05-31 18:31 EDT, Konrad Kolosowski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Shport CLA 2005-05-31 02:41:54 EDT
Hi, 

I have bumped into the following issue with Update Manager in Eclipse 3.1 RC1 
build. 
The problem occurs when you have "links" folder with *.link files enabling 
third-party plugins (I have been using this feature since Eclipse 2.x). 
When you start Eclipse first time it successfully discovers and enables all 
plugins placed into "links" folder. 
BUT on the second start Update Manager shows DULICATE entries for each 
extension location and plugin installed. 

It seems that Eclipse shows both its internal plugin directory and "links" 
contents in Update Manager.
Comment 1 Dorian Birsan CLA 2005-05-31 08:51:28 EDT
Looks like a dup of bug 97148

*** This bug has been marked as a duplicate of 97148 ***
Comment 2 Rafael Chaves CLA 2005-05-31 10:41:13 EDT
Dorian, this is probably caused by my now infamous patch, but is a different
issue. I will be looking into it.
Comment 3 Rafael Chaves CLA 2005-05-31 15:08:26 EDT
The problem arises from the fact sites are keyed by the URL's external form. Any
variations in the URL string (drive letter in upper/lower case, presence of a
slash before the drive letter, etc) will cause trouble during site lookup.
Comment 4 Rafael Chaves CLA 2005-05-31 15:12:55 EDT
Created attachment 22090 [details]
patch for org.eclipse.update.configurator

This patch makes sure the operations in Configuration that take site URLs as
keys translate them into a canonical form before doing any sort of lookup. This
fixes this problem and also fixes bug 97165 (which has been worked around
anyway).
Comment 5 Dorian Birsan CLA 2005-05-31 15:26:35 EDT
thanks Rafael.
The patch looks fine. I'll ping Dejan to see if more testing can be done on it.
Comment 6 Dejan Glozic CLA 2005-05-31 15:45:21 EDT
Looks fine to me too, but based the recent experence, I will hold my breath a 
bit longer :-).

One comment: is 'canonicalizeURL' even a word? Something along the line 
of 'getCanonicalForm(String url)' or similar.
Comment 7 Dorian Birsan CLA 2005-05-31 15:48:19 EDT
this really becomes a religious experience :-)
Comment 8 Dejan Glozic CLA 2005-05-31 15:52:15 EDT
As in 'let us pray that this is the last regression' :-)?
Comment 9 Rafael Chaves CLA 2005-05-31 16:01:58 EDT
Ok, one more and I will remove myself from the CC list...
Comment 10 Dorian Birsan CLA 2005-05-31 17:38:12 EDT
no, like in:

Main Entry: ca·non·i·cal 
Pronunciation: -ni-k&l
Function: adjective
1 : of, relating to, or forming a canon
2 : conforming to a general rule or acceptable procedure : ORTHODOX
3 : of or relating to a clergyman who is a canon

(will all due apologies to Rafael, who I don't want to alienate :-)
Comment 11 Konrad Kolosowski CLA 2005-05-31 18:31:14 EDT
Created attachment 22113 [details]
org.eclipse.update.configurator_3.1.0.jar

For people testing, this is configurator plug-in jar built with 3.1RC1 + patch
from bug 97148 comment 24, and this bug comment #4.
Comment 12 Philippe Ombredanne CLA 2005-05-31 19:11:47 EDT
This patch solves it for me, but only with a -clean and a new workspace.
Comment 13 Dejan Glozic CLA 2005-05-31 19:19:14 EDT
Clean is probably needed to get rid of obsolete paths in your platform.xml.
Comment 14 Konrad Kolosowski CLA 2005-06-01 15:41:32 EDT
Patch released into HEAD.
Comment 15 Konrad Kolosowski CLA 2005-06-01 15:44:42 EDT
*** Bug 97942 has been marked as a duplicate of this bug. ***
Comment 16 Dorian Birsan CLA 2005-06-02 15:37:52 EDT
marking the bug as fixed, as per comment #14.
Please re-open if you still see problems.