Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » P2 dev » Expressions for IU's ?
Expressions for IU's ? [message #528982] Thu, 22 April 2010 14:31 Go to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Hi, I'm once again getting started with p2, now it aims to be stable.

We have a client-server scenario where different customers run different server versions. now I want to be able to update the client to a specific version only (i.e. ask the server for its version at startup and then build a query that filters only applicable updates) I think I will go with that client and server can only have a different qualifier and the rest of the version must match.

with that i would be able to put out a minor client hotfix with a new qualifier that will be auto updated at startup. if customer upgrades his server, client will find new version number at startup and pull the new version from the repository.

but i completely have no clue how to build and expression with a version range. I saw that version =~ in QueryUtil, but what would that mean if 1.6.1 must be exactly matched, only the qualifier may have changed ?

can you give me any hints on this ?

Regards Thomas
Re: Expressions for IU's ? [message #528990 is a reply to message #528982] Thu, 22 April 2010 14:44 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
for now i see i maybe could use

public static IQuery<IInstallableUnit> createIUQuery(String id, VersionRange range) {

but i still dont understand how the version string in Version.parse()
must look if I want to match 1.6.1.qualifier of my product ?

can i even have a qualifier in the product iu or must i fallback on feature level ? I don't get this by now how ius are related to priduct/features, sorry.
Re: Expressions for IU's ? [message #528999 is a reply to message #528990] Thu, 22 April 2010 15:00 Go to previous message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
ok my understanding gets better. if I use match id and version that should be what i want. i could use createOSGI from version to match exactly that version. if I deploy the same product version to the repository with higher qualifiers in the features/bundles will they be updated then ?

I think this is what I want.

Sorry for asking before code-diving
Previous Topic:Using "include required software" when defining a Target Platform Definition with a P2 co
Next Topic:Best practise to upload repositories ?
Goto Forum:
  


Current Time: Fri Oct 31 18:05:04 GMT 2014

Powered by FUDForum. Page generated in 0.07427 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software