| Summary: | Test failures in nightly build | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | DJ Houghton <dj.houghton> | ||||
| Component: | Build | Assignee: | pde-build-inbox <pde-build-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aniefer, daniel_megert, tjwatson | ||||
| Version: | 3.8 | ||||||
| Target Milestone: | 3.8 M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
DJ Houghton
The new osgi VersionRange#toString can print something like "[1.0.0-,2.0.0-)". In pde.build's P2InfUtils we are generating a p2.inf file for p2. There are several places here where we use VersionRange.toString(). p2 has its own org.eclipse.equinox.p2.metadata.VersionRange class which is used when parsing the p2.inf file (from p2.publisher AdviceFileParser). This class does not understand the new format and throws and exception causing that particular piece of advice to be ignored leading to missing requirements in the result. A fix on PE/Build's side would be to no use VersionRange.toString and instead print the range ourselves in a format that p2 understands. In general p2 may have a larger problem if this new format makes its way into feature.xml or .product files. Created attachment 209111 [details]
work in progress
Here is a hack until p2 can properly handle fully qualified versions and pre-release versions.
The basic approach is to never call VersionRange.toString(). Instead there is a method added to Utils toString(VersionRange) which never prints fully qualified versions which have empty qualifiers. Instead it prints them with out the trailing '.' or '-'.
I am not convinced I found all places where VersionRange.toString() was called, but this patch at least let testBug277824 pass for me.
(In reply to comment #1) > In general p2 may have a larger problem if this new format makes its way into > feature.xml or .product files. This is tracked by bug 367991. Patch released. Thanks Tom. I've verified that we've caught all toString callers in PDE/Build but we will still need to fix things in p2 (bug 367991). http://git.eclipse.org/c/pde/eclipse.pde.build.git/commit/?id=67b2ea6074c2a2bc6701e678c843b3adf688fc24 I'm reopening this one as the fix did not get rid of all test failures. Since N20120105-2000 'testBug268498' constantly fails (and also failed in N20120104-2000). http://download.eclipse.org/eclipse/downloads/drops/N20120105-2000/testresults/html/org.eclipse.pde.build.tests_linux.gtk.x86_6.0.html . (In reply to comment #5) > I'm reopening this one as the fix did not get rid of all test failures. Since > N20120105-2000 'testBug268498' constantly fails (and also failed in > N20120104-2000). > > http://download.eclipse.org/eclipse/downloads/drops/N20120105-2000/testresults/html/org.eclipse.pde.build.tests_linux.gtk.x86_6.0.html This test also failed in the I20120103-0800 build which was before the VersionRange changes for pre-release support bug 366419. So it appears this failure is unrelated to the VersionRange changes. > This test also failed in the I20120103-0800 build which was before the > VersionRange changes for pre-release support bug 366419. So it appears this > failure is unrelated to the VersionRange changes. OK. File bug 368246. |