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

Bug 222480

Summary: Some features in platform.xml not showing up in "About" dialog
Product: [Eclipse Project] Equinox Reporter: Simon Kaegi <simon_kaegi>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clin, david_williams, igor.alelekov, jcayne, john.arthorne, Olivier_Thomann, overholt, pascal, samuelwu, simon_kaegi, susan, wmitsuda
Version: 3.4Flags: john.arthorne: review+
simon_kaegi: review+
Target Milestone: 3.4 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 235941    
Attachments:
Description Flags
Platform.xml from a Europa installation
none
sample site
none
patch
none
patch none

Description Simon Kaegi CLA 2008-03-12 17:10:54 EDT
For testing I installed eclemma using the user ui. The feature appears correctly in the Available Features.

The Eclemma Feature does not appear in the "About" dialog though. Perhaps this is expected as I also noticed that p2 user.ui feature is not visible there.
Comment 1 John Arthorne CLA 2008-03-13 17:40:26 EDT
You actually don't even get a "Feature details" button if update.configurator has never been kicked.  This is driven by the IBundleGroupProvider service that we don't currently implement in p2.
Comment 2 David Williams CLA 2008-03-22 22:33:35 EDT
I think I've hit this same bug, with different use case. 

Features installed from the "dropins" folder do not show up in the About Box's Feature Details. Though they did show up on the "installed features" in P2's configuration dialog. 

I consider this "major" as I think end-users will be confused (I was :) 
and experience it as a "missing function regression".


Comment 3 Joel Cayne CLA 2008-04-14 17:09:34 EDT
I think this defect might be related to plug-ins not showing up which have a branding plug-in described in the feature.xml. For example, if my feature is org.eclipse.tptp.trace.jvmti and my branding plug-in is org.eclipse.tptp.trace.jvmti.client then it won't show up in the about since the configuration\org.eclipse.update\platform.xml does not specify the org.eclipse.tptp.trace.jvmti.client plug-in next to the feature anymore (it used to in previous versions).

Samples from platform.xml below, note the missing plugin-identifier with p2.

old driver without p2:
<feature id="org.eclipse.tptp.trace.jvmti" plugin-identifier="org.eclipse.tptp.trace.jvmti.client" url="features/org.eclipse.tptp.trace.jvmti_4.2.0.v200704190100-33--w311816412415/" version="4.2.0.v200704190100-33--w311816412415" /> 

new driver with p2:
<feature url="features/org.eclipse.tptp.trace.jvmti_4.2.100.v200802291616-438Y7w311915221211/" id="org.eclipse.tptp.trace.jvmti" version="4.2.100.v200802291616-438Y7w311915221211" />
Comment 4 DJ Houghton CLA 2008-04-16 14:58:37 EDT
Yes, our ConfigurationParser was based on the spec for the platform.xml which doesn't seem to include a definition for the plugin-related attributes on the feature element.

We need to compare our ConfigurationParser to the one found in the old update manager and determine what extra un-spec'd things we need to be able to handle.
Comment 5 DJ Houghton CLA 2008-04-16 16:37:47 EDT
Joel, do you mind attaching your original platform.xml file to this bug? Thanks.
Comment 6 Joel Cayne CLA 2008-04-16 16:44:10 EDT
Created attachment 96341 [details]
Platform.xml from a Europa installation

The attached platform.xml was generated from a Europa installation.
Comment 7 DJ Houghton CLA 2008-04-16 18:34:25 EDT
Thanks, Joel. I've released some changes in HEAD to preserve attributes that we read from the platform.xml.
Comment 8 DJ Houghton CLA 2008-04-30 12:03:55 EDT
I've verified that with the changes now all installed features show up in the About dialog. (both installed by drop-ins or UI)

The only ones which don't show up are one without branding information (as Joel mentions in comment #3) and this is the same behaviour as the old update manager in 3.3.

Closing.
Comment 9 Joel Cayne CLA 2008-04-30 14:30:21 EDT
DJ,

I tried it on the I20080430-0800 driver and no additional information appeared in the platform.xml. Checking the Help -> About -> Feature details, the feature was also missing from the list.

Steps to reproduce:
Download the Eclipse SDK from http://download.eclipse.org/eclipse/downloads/drops/I20080430-0800/index.php
Download EMF (http://www.eclipse.org/downloads/download.php?file=/modeling/emf/emf/downloads/drops/2.4.0/I200804081800/emf-runtime-I200804081800.zip), XSD (http://www.eclipse.org/downloads/download.php?file=/modeling/emf/emf/downloads/drops/2.4.0/I200804081800/xsd-runtime-I200804081800.zip), and TPTP (http://www.eclipse.org/downloads/download.php?file=/tptp/4.5.0/dev/TPTP-4.5.0-200804280100/tptp.runtime-TPTP-4.5.0-200804280100.zip).
Extract the drivers to the dropins folder.
Check for org.eclipse.tptp.trace.jvmti (which has a branding plug-in) feature version information in platform.xml and an entry in the Feature Details dialog.
Comment 10 Pascal Rapicault CLA 2008-04-30 18:44:10 EDT
Slipping milestone.
The case that does not work is when a feature has a primary plugin with a different identifier and the feature is installed using p2.
Comment 11 Susan McCourt CLA 2008-05-19 13:25:30 EDT
From bug 232662:

> Enter Software updates, Available software.
>- Add Mylyn update site
>(http://download.eclipse.org/tools/mylyn/update/weekly/e3.4)
>- Check and install ONLY the "Mylyn Connector: Bugzilla" feature.
>- p2 seems to be smart enough to install the dependencies, because after
>restart the task list feature is available too (Ctrl+Shift+K shows the task
>list view).

<snip some discussion of a different bug>

>In my case, neither of the 2 features (the one I installed, and the dependency)
>are shown in the about->features.

Comment 12 DJ Houghton CLA 2008-05-27 18:13:18 EDT
Created attachment 102260 [details]
sample site

Here is a an update site which contains a feature/plugin which demonstrates the problem.

- Help -> Software Updates -> Available Software -> Add Site
- Select the NonBrandingFeature and Install, restart
- Help -> About - Notice there isn't a new icon for the feature
- Help -> About -> Features - Note the feature isn't listed

If you install the feature via the old Update Manager UI (enable it through the Classic Update capability) then it will appear in both places.
Comment 13 DJ Houghton CLA 2008-05-27 18:14:29 EDT
Created attachment 102261 [details]
patch

Work in progress. This patch fixes the problem but I still need to confirm that we are handling all feature attributes and sub-elements in the parsing.
Comment 14 DJ Houghton CLA 2008-05-28 19:05:26 EDT
Created attachment 102546 [details]
patch

Updated patch ready for review.
Comment 15 DJ Houghton CLA 2008-05-28 19:51:03 EDT
To explain the nature of the changes in the patch, we have a Feature object which represents a feature from a feature.xml file and there were a few element attributes missing from the object.

So we have:
- added the attributes to the Feature object
- modified the FeatureParser to set those values when it reads a feature.xml
- in the MetadataGeneratorHelper we set IU properties to represent those attributes
- in the InstallFeatureAction we read those properties to pass them along to the config
- in the config wrapper we pass along the attributes to the configuration
Comment 16 Joel Cayne CLA 2008-05-29 09:46:35 EDT
*** Bug 224542 has been marked as a duplicate of this bug. ***
Comment 17 DJ Houghton CLA 2008-05-29 10:18:26 EDT
One other comment about this patch. There is code in the InstallFeatureAction which grabs the properties from the IU and then passes them along to the configuration (which builds a feature object to write out to the platform.xml).

Simon noticed that some of the properties are not really used so I wanted to add the comment that this is because of the differences between the feature in the feature.xml and the feature in the platform.xml. We are using the Feature object to represent both but the one in the platform.xml doesn't need all the same information.
Comment 18 Simon Kaegi CLA 2008-05-29 11:19:55 EDT
Looks good. I verified things before and after your patch with shared install on windows.
Comment 19 John Arthorne CLA 2008-05-29 11:34:14 EDT
+1. I would opt to not add the extra attributes in the generator that we don't use in the touchpoint, but I can live with it either way.
Comment 20 DJ Houghton CLA 2008-05-29 11:50:18 EDT
Agreed. We need to clean up some of this code in the 3.5 timeframe. 
Released.