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

Bug 184272

Summary: use system filters to define what plugins to be downloaded through Update Manager
Product: z_Archived Reporter: Valentina Popescu <popescu>
Component: TPTPAssignee: Joel Cayne <jcayne>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: jkubasta, nmehrega, sluiman, stoian
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460

Description Valentina Popescu CLA 2007-04-26 12:38:44 EDT
The new IAC implementation has created a set of eclipse plugins, one per supported system architecture. With this approach, we need to be able to filter out plugins for specific user configurations so that only plugins which are valid for a system configuration can be installed using Update Manager and loaded at execution time.

The following plugins and their corresponding features need to be updated by adding the os and arch properties:

Plugins :
org.eclipse.tptp.platform.ac.linux_em64t
org.eclipse.tptp.platform.ac.linux_ia32
org.eclipse.tptp.platform.ac.linux_ipf
org.eclipse.tptp.platform.ac.win_em64t
org.eclipse.tptp.platform.ac.win_ia32
org.eclipse.tptp.platform.ac.win_ipf

Feature:
org.eclipse.tptp.platform.core

What needs to be done:

1.	Filter out plugins when download TPTP using Update Manager.

This can be achieved by using the os and arch attributes in the fragment.xml file for the feature that imports the plugin:

  <plugin ws="gtk" os="linux" fragment="true" arch="x86" download-size="0" install-size="0" id="org.eclipse.platform.source.linux.gtk.x86" version="3.2.1.r321_v20060921-b_XVA-INSQSyMtx" /> 

Read more about this here 
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/update_sitemap.html

2.	Filter out plugins that can be loaded at run time, based on user’s system configuration

Use Eclipse-PlatformFilter section in the Manifest.mf file:

Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86))

More about this here
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html

Note :
We already use the Eclipse-PlatformFilter option in the org.eclipse.tptp.platform.ac.linux_ia32 plugin

We should have also been used the corresponding feature options for this plugin so that the Update Manager picks up this plugin only for a user environement matching the specified os and arch:

   <plugin
         id="org.eclipse.tptp.platform.ac.win_ia32"
	   os=”win32”
         arch=”x86”
         download-size="0"
         install-size="0"
         version="0.0.0"/>
Comment 1 Valentina Popescu CLA 2007-04-26 12:51:11 EDT
Correction; Eclipse-PlatformFilter is not used in org.eclipse.tptp.platform.ac.linux_ia32 plugin, but in the old org.eclipse.hyades.execution(.linux, etc ) plugins.

The Eclipse-PlatformFilter options might be also used in the new IAC execution plugins but since I don't have an Intel build of those plugins I can't verify it. I did check on the feature importing them though ( org.eclipse.tptp.platform.core
 ) and it is not using the os filter attributes
Comment 2 Valentina Popescu CLA 2007-04-26 13:05:49 EDT
One last comment; the old execution plugins in the feature.xml file did have the os filters specified.

They have been replaced with the new IAC execution plugins on 04/11 ( revision 1.60 of the feature plugin ) but the os specification has been removed and not being added back. This looks like a regression introduced in 4.4 that needs to be fixed in 4.4.

Old plugin import :

   <plugin
         id="org.eclipse.hyades.execution.win32.x86"
         os="win32"
         arch="x86"
         download-size="0"
         install-size="0"
         version="0.0.0"
         fragment="true"/>

New plugin import, missing system properties :

   <plugin
         id="org.eclipse.tptp.platform.ac.win_ia32"
         download-size="0"
         install-size="0"
         version="0.0.0"/>
Comment 3 Hubert Leung CLA 2007-05-03 13:15:24 EDT
Sorin has added the os and arch filters. 
Comment 4 Hubert Leung CLA 2007-05-03 13:21:19 EDT
Reopenning bug to investigate a build issue related to this change.  The plugins with os and arch filters are not packaged in the zip files.  
Comment 5 jkubasta CLA 2007-05-04 09:38:07 EDT
Not containable in 4.4
Comment 6 jkubasta CLA 2007-05-04 09:39:38 EDT
Not containable in 4.4
Comment 7 Harm Sluiman CLA 2008-01-30 11:19:43 EST
This defect is very critical to resolve in the current release. Is it understood how to enable teh supprot requested, or is there still design required and perhaps unknown dependancies to resolve?
Comment 8 Joel Cayne CLA 2008-01-31 17:22:04 EST
TPTP provides one zip containing all the plug-ins for every platform. To do this, I am looking into using groupConfigurations to maintain this format while providing the requested functionality.
Comment 9 Joel Cayne CLA 2008-02-04 09:44:50 EST
Using group configurations, the same behaviour occurs as described in comment #4.
Comment 10 Joel Cayne CLA 2008-03-05 10:30:16 EST
I have added OS and Architecture filters to the manifest.mf in the plug-ins:
org.eclipse.tptp.platform.ac.linux_em64t
org.eclipse.tptp.platform.ac.linux_ia32
org.eclipse.tptp.platform.ac.linux_ipf
org.eclipse.tptp.platform.ac.win_em64t
org.eclipse.tptp.platform.ac.win_ia32
org.eclipse.tptp.platform.ac.win_ipf

The filters have also been added to the entries in the feature.xml of the containing feature org.eclipse.tptp.platform.core.

Downloading the driver from the website, such as the All TPTP Plug-ins runtime, contains all platform plug-ins but only enables the platform specific org.eclipse.tptp.platform.ac plug-in in the workbench. Verified by going to Help -> About Eclipse SDK -> Plug-in Details -> sorting the list by Plug-in ID and looking for the plug-in.

Downloading the driver from the update site downloads and installs only the platform specific org.eclipse.tptp.platform.ac plug-in. Verified by creating a sample update site, selecting only the platform project and performing the above check in the workbench. Also checked the eclipse/plugins folder to verify the plug-ins downloaded.
Tested on Windows and Linux IA32 platforms. Based on the testing, (1) from comment 1 does not appear to be required, so only (2) was performed.
Comment 11 Paul Slauenwhite CLA 2009-06-30 14:00:59 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.