Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 273747 - [publisher] Start level specified in the product are ignored
Summary: [publisher] Start level specified in the product are ignored
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: 3.5 RC2   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 272945 (view as bug list)
Depends on: 273959
Blocks:
  Show dependency tree
 
Reported: 2009-04-26 16:59 EDT by Pascal Rapicault CLA
Modified: 2009-05-19 05:53 EDT (History)
3 users (show)

See Also:


Attachments
Example product (94.94 KB, application/octet-stream)
2009-04-26 17:13 EDT, Pascal Rapicault CLA
no flags Details
publisher patch (3.94 KB, patch)
2009-04-27 20:04 EDT, Ian Bull CLA
no flags Details | Diff
updated patch (4.21 KB, patch)
2009-04-27 23:43 EDT, Ian Bull CLA
no flags Details | Diff
Updated patch (10.44 KB, patch)
2009-04-28 02:40 EDT, Ian Bull CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2009-04-26 16:59:33 EDT
I20090421 and HEAD
The attached product specifies start level in the configuration tab. When I export it using the PDE export wizard, the resulting installation is not runnable.
A quick look at the repository generated seems to indicate that there is no CU to set the start level of the bundles listed in my product.
Comment 1 Pascal Rapicault CLA 2009-04-26 17:13:28 EDT
Created attachment 133271 [details]
Example product
Comment 2 Pascal Rapicault CLA 2009-04-26 21:39:45 EDT
*** Bug 272945 has been marked as a duplicate of this bug. ***
Comment 3 Ian Bull CLA 2009-04-26 21:50:04 EDT
I'll take this one.
Comment 4 Ian Bull CLA 2009-04-27 20:04:40 EDT
Created attachment 133466 [details]
publisher patch

The problem is (was) that we were adding all the bundle infos before looking at the start levels.  Then, when we found the start levels, we already had the bundles info so we ignored them.  This patch fixes that. I have created a simple mail app, and started all bundles and it launchers.

What are the proper bundles needed to launch?

Also, if you set the start level to default, launching fails (default in the IU seems to indicate 0). That is a separate bug.
Comment 5 Ian Bull CLA 2009-04-27 20:07:22 EDT
I opened Bug 273961 for the default start level problem.
Comment 6 Ian Bull CLA 2009-04-27 23:43:03 EDT
Created attachment 133475 [details]
updated patch

This patch is the same as before, but I updated the tests
Comment 7 Ian Bull CLA 2009-04-28 02:40:01 EDT
Created attachment 133489 [details]
Updated patch

After looking at my original patch, I realized that we have a problem. There is comparator that returns 0 in cases when .equals != true.  I have refactored this code and added some new test cases.
Comment 8 Pascal Rapicault CLA 2009-04-28 21:39:56 EDT
I have done testing with this patch and it works. Released in HEAD.
Comment 9 Thomas Hallgren CLA 2009-05-19 05:25:56 EDT
This patch caused a rather serious regression for all feature based products that have no explicit config.ini defined. The configIni element looks like this:

   <configIni use="default">
   </configIni>

which results in a configPath of null in the ProductFile. The flow of execution then becomes this:

a) ProductFileAdvice.getConfigData() is called.
b) It calls createDataLoader() method which returns null.
c) This results in a call to generateConfigData() which returns an empty ConfigData for all feature based products.
d) addProductFileConfigBundles() is called with the empty ConfigData and hence, does nothing at all.

The result is an unusable product since entries like this are forgotten:

   <configurations>
      <plugin id="org.eclipse.equinox.app" autoStart="true" startLevel="4" />
   </configurations>
Comment 10 Thomas Hallgren CLA 2009-05-19 05:53:21 EDT
Please ignore that. The problem was in my own code, trying to find a workaround for the fact that I cannot use the ProductAction in a setup where multiple products are published.