0

I'm updating the RCP application from the site, which contains the new version of the application (9.0.0.46). But "Check for Updates" returns "No updates were found". Example: existing version is 9.0.0.7; new version is 9.0.0.46.

For the existing version 9.0.0.13 the new version (9.0.0.46) was found.

It seems that versions are compared as a Strings, and as 4 < 7 the RCP doesn't see the new version in the first case, and as 4 > 1 it sees the second one. How to check this assumption and resolve this issue?

Thanks!

  • I believe the fourth part of the version is not considered at all, it is usually just a build qualifier value (not a number). – greg-449 Nov 02 '21 at 11:07
  • It's nice to hear from you again, @greg-449! Last time [link](https://stackoverflow.com/a/66265812/6863550) you helped me a lot! If I understand correctly, only first 3 numbers are considered, lets say in my case: 9.0.0. So to make the new version I should do, for example: 9.0.1. Yet, it's steel strange that in one case the new version was found, but in the other it wasn't. And these versions differ only be qualifiers. – Volodymyr Patriiuk Nov 02 '21 at 14:33
  • I don't use the p2 code so I'm not sure what the exact rules are. But the 4th part can definitely be anything so it won't be treating it as a number and any comparison will be string based. So I think changing the major/minor/micro values is what you are supposed to do. – greg-449 Nov 02 '21 at 14:49

1 Answers1

0

I finally found the answer in the https://wiki.eclipse.org/Version_Numbering. In RCP applications, the build number is composed of four (4) segments: three integers and a string, respectively named major.minor.service.qualifier. While the first three segments (major, minor and service) are compared as numbers, the last one (qualifier) is compared lexicographically. So, in my case, it is actually an expected behavior.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77