Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351833

Summary: Installing _anything_ from Indigo silently installs Lucene optional bundles as a side-effect
Product: [Tools] Orbit Reporter: Martin Oberhuber <mober.at+eclipse>
Component: bundlesAssignee: Gunnar Wagenknecht <gunnar>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: david_williams, gunnar
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch v1, adding p2.inf to make dependencies non-greedy none

Description Martin Oberhuber CLA 2011-07-12 09:16:28 EDT
Build ID: Eclipse 3.7 (Indigo)

Steps to reproduce:
1.) Install Eclipse Platform Runtime Binary, eg
    http://download.eclipse.org/eclipse/downloads/drops/R-3.7-201106131736/
    download.php?dropFile=eclipse-platform-3.7-win32.zip
2.) Launch Eclipse
3.) Help > Install New Software... 
    pick http://download.eclipse.org/releases/indigo
4.) Install "Mobile and Device Development > Target Management Terminal"

--> Following Lucene optional bundles are installed silently as a side-effect:

org.apache.lucene.highlighter_2.9.1.v20100421-0704.jar
org.apache.lucene.memory_2.9.1.v20100421-0704.jar
org.apache.lucene.misc_2.9.1.v20100421-0704.jar
org.apache.lucene.queries_2.9.1.v20100421-0704.jar
org.apache.lucene.snowball_2.9.1.v20100421-0704.jar
org.apache.lucene.spellchecker_2.9.1.v20100421-0704.jar
Comment 1 Martin Oberhuber CLA 2011-07-12 09:19:46 EDT
Created attachment 199494 [details]
patch v1, adding p2.inf to make dependencies non-greedy

The underlying problem for installing optional runtime dependencies as a side-effect has been discussed on bug 247099. In fact the p2 publisher will be changed in the Juno timeframe, to no longer cause this.

For the Indigo time frame, it is possible to explicitly mark optional runtime dependencies non-greedy by adding a p2.inf file. This approach is in-line with the approach on bug 247099, it just makes the fix explicitly which will be done implicitly in the future.

Attached patch adds the necessary p2.inf for org.apache.lucene .
Comment 2 Gunnar Wagenknecht CLA 2011-07-12 10:28:09 EDT
+1

Martin, feel free to commit and release. :)
Comment 3 David Williams CLA 2011-07-12 17:26:11 EDT
IMHO, this is a "breaking" change ... I'm sure you can imagine some might depend on this behavior. But, I don't know of anyone who does, or anyone who would complain. But ... at some point ... this "potentially breaking change in maintenance release" should be announced on cross-project, with some indication of how to get "old" behavior (i.e. refer to those optional bundles explicitly in feature) and give community a chance to complain ... just in case. 

To be clear, I am not 'objecting' to this change (though, don't like it much ... I did open bug 349515 so the help system would stop depending on the umbrella lucene bundle ... which is a better fix, imho, but, again, I know there is a real problem here and I'm not that picky how fixed ... just commenting and cross referencing bug entries).
Comment 4 Gunnar Wagenknecht CLA 2011-07-13 02:14:18 EDT
(In reply to comment #3)
> IMHO, this is a "breaking" change ...

I'm not sure it really is. The umbrella bundle has optional dependencies on the other bundles. This is stated as optional in the manifest. Any client that rely on any optional API must be prepared that it's not available all the time. If not it's a violation of the optional contract (IMO).

Clients using Import-Package won't notice because p2 will install the bundles for them automatically.
Comment 5 David Williams CLA 2011-08-10 02:02:41 EDT
Is this required for Indigo SR1? Or will Juno suffice? I ask since I do not see it released to a build yet? Waiting on anything? Change your mind?
Comment 6 David Williams CLA 2012-01-20 14:19:09 EST
I think this will be indirectly fixed by bug 368999, in Juno M5. So, will mark this as "won't fix" since patches not applied, no change to Lucene bundle directly, and since won't be fixed for Indigo. 

Also, see bug 365693 which might complicate things?
Comment 7 David Williams CLA 2012-01-20 14:19:45 EST
Feel free to reopen if I have misunderstood anything.