Bug 364247 - [publisher] Plugin start configuration support in feature parser
Summary: [publisher] Plugin start configuration support in feature parser
Status: NEW
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 263087
Blocks: 364246
  Show dependency tree
 
Reported: 2011-11-20 18:52 EST by Katya Stoycheva CLA
Modified: 2013-02-06 05:29 EST (History)
4 users (show)

See Also:


Attachments
Feature parser now understands autostart flag (6.40 KB, patch)
2011-11-20 18:53 EST, Katya Stoycheva CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Katya Stoycheva CLA 2011-11-20 18:52:28 EST
Build Identifier: 

Currently there is PDE UI for configuring plugin start flag only on product
level. It would be useful to have such option on feature level as well

Custom configuration of a feature containing ~30 bundles (like p2 feature) requires ~800 lines of p2.inf. The file length and its complexity (one should know p2 metadata representations) makes it too difficult for troubleshooting  and maintenance. 

Current proposal is only for the start flag.  


Reproducible: Always
Comment 1 Katya Stoycheva CLA 2011-11-20 18:53:35 EST
Created attachment 207281 [details]
Feature parser now understands autostart flag
Comment 2 Katya Stoycheva CLA 2011-11-20 18:56:47 EST
PDE UI bug linked. I think they don't depend on one another from technical perspective, just make an end-to-end scenario complete.
Comment 3 Pascal Rapicault CLA 2011-11-22 08:50:22 EST
I agree that the authoring experience is rather bad.

If I understand correctly, the proposed solution allows the user to flag the feature as "autostart" and I suppose set a start level that will be applied to every plugin.
I have a few questions:
- How many CUs are generated? What are they attached to?
- What happens when two features include the same plugin with different start levels?
- What happens when the plugin has a p2.inf and this functionality is used?
Comment 4 Katya Stoycheva CLA 2011-11-22 13:33:17 EST
(In reply to comment #3)
> I agree that the authoring experience is rather bad.
> If I understand correctly, the proposed solution allows the user to flag the
> feature as "autostart" and I suppose set a start level that will be applied to
> every plugin.
It's actually a start configuration per plugin, rather than a flag on a feature level. When the user selects a plugin to be included, he could decide to mark it as started (the default is false). Here's an example of a feature.xml:
<feature
      id="TestF"
      label="TestF"
      version="1.0.0.qualifier">

   <plugin
         id="Test"
         download-size="0"
         install-size="0"
         version="0.0.0"
         autostart="true"/>

</feature>
I think that starting all plugins of a feature would be a rare case. 

> I have a few questions:
> - How many CUs are generated? What are they attached to?
It's one CU per plugin (when autostart is set to true). All are attached to the feature. 

> - What happens when two features include the same plugin with different start
> levels?
Each feature decides whether the plugin would be started or not and corresponding CU is attached. The new attribute is more related to a plugin as FeatureEntry rather than to the plugin as standalone unit. Does it make sense?

> - What happens when the plugin has a p2.inf and this functionality is used?
I looked for a priority mechanism in ProductAction where the same ambiguity could appear but couldn't find any. Currently if there's a p2.inf defining a feature req to a generated CU then both would be attached and at runtime one would be picked randomly. What do you  think should be the correct behavior?
(Currenlty, as far as I've seen, from purely code point of view it's easier to ignore p2.inf if there's configuration of the new kind) We can discuss a priority mechanism (if it doesn't exist), just need to have in mind that it should be adopted by the product action in order to ensure consistent behavior.
Comment 5 Tobias Oberlies CLA 2013-02-06 04:37:15 EST
(In reply to comment #4)
> > - What happens when two features include the same plugin with different start
> > levels?
> Each feature decides whether the plugin would be started or not and
> corresponding CU is attached. The new attribute is more related to a plugin
> as FeatureEntry rather than to the plugin as standalone unit. Does it make
> sense?
So if both features are installed, there are two CUs for the same plug-in. AFAIK this is not supported - see bug 263087.