Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 277923 - [publisher] CUs generated with wrong version on host requirement
Summary: [publisher] CUs generated with wrong version on host requirement
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.5 RC3   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 14:41 EDT by Andrew Niefer CLA
Modified: 2009-05-27 14:20 EDT (History)
4 users (show)

See Also:
pascal: review+
dj.houghton: review+
simon_kaegi: review+
irbull: review+


Attachments
path + test (5.97 KB, patch)
2009-05-26 16:04 EDT, Andrew Niefer CLA
no flags Details | Diff
Publisher Testcase (3.32 KB, patch)
2009-05-27 02:45 EDT, Ian Bull CLA
dj.houghton: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2009-05-26 14:41:39 EDT
Changes for bug 275316 can create CU fragments with an incorrect version range for the host requirement.

This results in broken metadata.
Comment 1 Andrew Niefer CLA 2009-05-26 15:04:22 EDT
Note that because the host range for the CU does not have an upper bound, this will only be noticed if the bundle version is less than the product version (which is why it wasn't caught by the existing unit tests)
Comment 2 Andrew Niefer CLA 2009-05-26 16:04:55 EDT
Created attachment 137217 [details]
path + test
Comment 3 Ian Bull CLA 2009-05-26 19:29:04 EDT
When creating a CU should we set the host requirement to the *exact* version of the host IU.  We currently set it to:
new VersionRange(hostVersion, true, PublisherHelper.versionMax, true);

What about [hostVersion,hostVersion].

I'm sure there is a good reason for the current behaviour.  I just want to make sure it's intentional.

Comment 4 Ian Bull CLA 2009-05-26 19:39:55 EDT
(In reply to comment #3)
> I'm sure there is a good reason for the current behaviour.  I just want to make
> sure it's intentional.
> 

Actually I assume it's so we can publish a new bundle without publishing a new CU. 
Comment 5 Ian Bull CLA 2009-05-27 02:45:03 EDT
Created attachment 137270 [details]
Publisher Testcase

To ensure that I understood the problem (and solution) I wrote a publisher test case. I also added a case to the metadata analyzer tool to check that for each fragment, the hosts can be resolved.
Comment 6 Simon Kaegi CLA 2009-05-27 14:05:29 EDT
Looks good. We should release Ian's test too.
Comment 7 DJ Houghton CLA 2009-05-27 14:20:14 EDT
Released both patches to HEAD.