Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336425 - How to invoke '-clean' automatically after update?
Summary: How to invoke '-clean' automatically after update?
Status: RESOLVED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-05 13:43 EST by Michael Spector CLA
Modified: 2011-06-10 22:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Spector CLA 2011-02-05 13:43:42 EST
I'm using the attached class to perform an automatic update for our RCP application. The last time I released an update, I've upgraded one of dependencies from 1.2.3.1 to 1.2.3.2 version. Even though dependent plug-ins have strict dependency on 1.2.3.2, some of our clients have complained that wrong plug-in is being loaded after upgrade (that of version 1.2.3.1). Running the application with "-clean" helped to solve the problem.

So, my question is whether it's possible to make eclipse run "-clean" after update automatically?
Comment 1 Pascal Rapicault CLA 2011-02-05 21:11:12 EST
No, this is not possible. 
What you can do is install an IU that set the osgi.clean property to true.
Comment 2 Pascal Rapicault CLA 2011-02-05 21:14:59 EST
oops... validated to fast
You can then uninstall this IU upon a successful restart. 
That said I think the fact that this plugin is not picked is highly suspicious (since the old one should no longer be in the bundles.info) and we would appreciate if you could open a bug with steps against equinox.
Comment 3 Michael Spector CLA 2011-02-06 01:17:54 EST
(In reply to comment #2)
> oops... validated to fast
> You can then uninstall this IU upon a successful restart. 
> That said I think the fact that this plugin is not picked is highly suspicious
> (since the old one should no longer be in the bundles.info) and we would
> appreciate if you could open a bug with steps against equinox.

How about this one? Regarding steps, it seems like the bug doesn't happen all the time, we've only seen this happening for some customers, which is really weird. There's nothing special in the setup, our RCP application is based on features. The "problematic" plug-in is a Mozilla XPCOM, which has a 4 digit version, like:

1.9.2.13_201101261729

Dependent plug-ins require this version strictly:

org.mozilla.xpcom;bundle-version="1.9.2.13"

What files should I attach to this bug in case this happens again?
Comment 4 Pascal Rapicault CLA 2011-06-10 22:49:37 EDT
If the situation occurs again you would have to attach the state files in configuration/org.eclipse.osgi/ as well as the configuration/org.eclipse.equinox.simpleconfigurator/bundles.info and the problematic bundles.