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

Bug 264724

Summary: [publisher] ProductAction.createRootAdvice should handle the case when children don't have versions
Product: [Eclipse Project] Equinox Reporter: Ian Bull <irbull>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, jeffmcaffer
Version: unspecified   
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 264266    
Bug Blocks: 264746    
Attachments:
Description Flags
start of a patch
none
mylyn/context/zip none

Description Ian Bull CLA 2009-02-12 12:21:53 EST
If versions are not specified on the bundles or features that constitute a product, the publisher should use version advice to find out this information.
Comment 1 Ian Bull CLA 2009-02-24 19:29:57 EST
Created attachment 126647 [details]
start of a patch

This patch starts the work towards using version advice in product publishing.  There are a few questions
- What namespace should be used to find the version advice?
- When do we look for advice?  (when version == null or 0.0.0, or both)
- What do we do when we can't find version advice? (set null or 0.0.0)
- Do we need to do this for other actions?
Comment 2 Ian Bull CLA 2009-02-24 19:30:04 EST
Created attachment 126648 [details]
mylyn/context/zip
Comment 3 Andrew Niefer CLA 2009-03-04 10:35:18 EST
I have released changes using Ian's patch as a starting point.
If we don't find advice we query for the latest iu.

I used IInstallableUnit.NAMESPACE_IU_ID for the namespace for now.   However, I'm not convinced in general of the need for namespace on version advice. 

I raised bug 267039
Comment 4 Andrew Niefer CLA 2009-03-06 11:26:23 EST
I added a second load method to accept a idSuffix to apply to the keys in the properties file.  (ie ".feature.group")

I have also modified the product ant task to accept version advice:
<p2.publish.product   ...>
    <advice kind="featureVersions" file="featureVersions.properties" />
    <advice kind="pluginVersions" file="pluginVersions.properties" />
</p2.publish.product>

The "featureVersions" supply the ".feature.group" suffix for the load.