Bug 264724 - [publisher] ProductAction.createRootAdvice should handle the case when children don't have versions
Summary: [publisher] ProductAction.createRootAdvice should handle the case when childr...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 264266
Blocks: 264746
  Show dependency tree
 
Reported: 2009-02-12 12:21 EST by Ian Bull CLA
Modified: 2009-03-06 11:26 EST (History)
2 users (show)

See Also:


Attachments
start of a patch (2.25 KB, patch)
2009-02-24 19:29 EST, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (1.30 KB, application/octet-stream)
2009-02-24 19:30 EST, Ian Bull CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.