Bug 21750 - Plugin disabled after Feature update
Summary: Plugin disabled after Feature update
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: 2.0.1   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-22 07:27 EDT by Boris Pruessmann CLA
Modified: 2002-07-26 12:15 EDT (History)
1 user (show)

See Also:


Attachments
Update site for reproducing the bug (19.98 KB, application/octet-stream)
2002-07-23 02:51 EDT, Boris Pruessmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Pruessmann CLA 2002-07-22 07:27:22 EDT
Eclipse R2.0 

We are using the Eclipse feature support for distributing common plugins to 
developers workstation. For example:

feature_0.0.1
  plugina_1.0.5
  pluginb_2.0.3

feature_0.0.2
  pluginA_1.0.5
  pluginB_2.0.4

After updating from feature_0.0.1 to feature_0.0.2, pluginA has been disabled 
(indicated in the feature's status). The reason seems to be the fact that the 
same plugin version is included in two different versions of the feature 
(manually removing the old feature version from the installations resolves the 
problem) 

Is there currently any workaround for this problem?
Comment 1 Christophe Elek CLA 2002-07-22 07:59:04 EDT
Hum, this should work fine

Can you pos the testcase ? (i can try to recreate it, but the exact same
testcase will 1) same me time ;-) 2) same more time if I cannot reproduce it
with my testcase ;-)
Comment 2 Boris Pruessmann CLA 2002-07-22 09:56:47 EDT
sorry, but i can't provide the plugins used. But it's really that simple ;) - 
if your test case doesn't work, I can try to create one from scratch for you.
Comment 3 Christophe Elek CLA 2002-07-22 10:22:16 EDT
Well, I tried ;-)

I got 2 features

RedDot 1.0.0 -> plugin 1.0.0
RedDot 1.0.1 -> plugin 1.0.0

I install RedDot 1.0.0, I can see Feature 1.0.0 and plugin 1.0.0 from Help
I update to RedDot 1.0.1, I can see Feature 1.0.1 and plugin 1.0.0 from Help
Comment 4 Boris Pruessmann CLA 2002-07-23 02:51:20 EDT
Okay, you've won. I have to admit that it's a little more complicated issue 
than I thought in first place: you need three plugins. 

Everything works fine as long as you only have installed two versions of the 
feature (meaning: two installed, one active in the configuration). If you 
install the third one, after Eclipse has restarted the active feature shows an 
error icon in the Update Manager. Status: The feature is not configured 
properly. No plugin: "..." included at runtime.

I attached a stripped down update site for you. (Content has been stripped off 
the plugins except for the plugin.xml/plugin.properties).
Comment 5 Boris Pruessmann CLA 2002-07-23 02:51:47 EDT
Created attachment 1722 [details]
Update site for reproducing the bug
Comment 6 Christophe Elek CLA 2002-07-24 12:01:06 EDT
Reproduced, boost priority and severity
Comment 7 Christophe Elek CLA 2002-07-26 12:15:06 EDT
Finally found it ;-)

the calculation of included/excluded plugin is a delat between the included of
the enable feature and the excluded of the disable feature.
In this scenario, the calculation found 2 excluded plugins instead of realizing
they were the same. So the delta always kept one.

Changed the code to use a Set instead of a List for excluded plugins. Tested
with own testcase. Provide in 2.0.1 stream