Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Updating with P2 from PDE-built to Buckminster-built product
Updating with P2 from PDE-built to Buckminster-built product [message #955211] Tue, 23 October 2012 16:03 Go to next message
M. Emmerling is currently offline M. EmmerlingFriend
Messages: 7
Registered: December 2011
Location: Palatinate
Junior Member
Hi all!

I think we have a similar problem like Mr. Scholz in http://www.eclipse.org/forums/index.php/mv/msg/354684/875978/#msg_875978 with our project.

Our RCP project uses an implementation of the P2 Operations API (UpdateOperation + ProvisioningJob) for updating.
Previous versions have been built via the PDE Export wizard but as our project kept growing, we decided to setup a buildsystem using Buckminster Headless within a Jenkins CI.
The problem now is that the PDE-built products cannot be updated from repositories built with Buckminster. The result of an update request would simply state "nothing to update".
As I was analysing the differences between PDE and Buckminster built repos/products, I noticed that the names of the profiles and root IUs differ.

The projects consists of two products therefor we chose two releng features containing the product definitions and a reference to our main plugin (where the product extension point is defined).

With the following product definition (filename: myAppA.product)
- ID: "" (blank)
- version: "1.0.0.qualifier"
- name: "myAppAProduct"
- product: "myAppA.main.product"
- application: "myAppA.main.application"

... this is what is generated:

1. by PDE export wizard:
1.1 content.xml in repo
Quote:

...
<unit id='myAppA.main.product' version='1.0.0.201207181026'>
<update id='myAppA.main.product' range='0.0.0' severity='0'/>
<properties size='3'>
<property name='org.eclipse.equinox.p2.name' value='myAppAProduct'/>
<property name='lineUp' value='true'/>
<property name='org.eclipse.equinox.p2.type.group' value='true'/>
</properties>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='myAppA.main.product' version='1.0.0.201207181026'/>
</provides>
...

1.2 profile-file in ./p2/org.eclipse.equinox.p2.engine/profileRegistry/<profilename>/<latest>.profile.gz
Profile name is "profile.profile"
Quote:

...
<iuProperties id='myAppA.main.product' version='1.0.0.201207181026'>
<properties size='2'>
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
<property name='org.eclipse.equinox.p2.type.root' value='true'/>
</properties>
</iuProperties>
<iuProperties id='myAppA.main.product_root.win32.win32.x86' version='1.0.0.201207181026'>
<properties size='1'>
<property name='unzipped|@artifact|/some/path' value='/some/path/myAppA|'/>
</properties>
</iuProperties>
</iusProperties>
...


2. by Buckminster:
We perform the standard site.p2 action as prerequesite to a rather common create.product action which calls p2's director:
Quote:

<java jar="${equinox.launcher.jar}" fork="true" failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.equinox.p2.director" />
<arg value="-repository" />
<arg value="${repository}" />
<arg value="-destination" />
<arg value="${destination}" />
<arg value="-profile" />
<arg value="${profile}" />
<arg value="-profileProperties" />
<arg value="org.eclipse.update.install.features=true" />
<arg value="-installIU" />
<arg value="${iu}" />
<arg value="-p2.os" />
<arg value="${target.os}" />
<arg value="-p2.ws" />
<arg value="${target.ws}" />
<arg value="-p2.arch" />
<arg value="${target.arch}" />
<arg value="-roaming" />
<arg value="-consoleLog" />
</java>

Where the iu property is set to myAppA.product.
To stop Buckminster from complaining (about "The installable unit myAppA.product has not been found.") I had to change the ID in the product definition to "myAppA.product".
Now Buckminster builts just fine, but with following differences to the PDE-wizard...
2.1 content.xml in repo
Quote:

...
<unit id='myAppA.product' version='3.1.1'>
<update id='myAppA.product' range='0.0.0' severity='0'/>
<properties size='3'>
<property name='org.eclipse.equinox.p2.name' value='myAppAProduct'/>
<property name='lineUp' value='true'/>
<property name='org.eclipse.equinox.p2.type.group' value='true'/>
</properties>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='myAppA.product' version='3.1.1'/>
</provides>
...


2.2 profile-file in ./p2/org.eclipse.equinox.p2.engine/profileRegistry/<profilename>/<latest>.profile.gz
Quote:

...
<iusProperties size='175'>
<iuProperties id='myAppA.product' version='3.1.1'>
<properties size='2'>
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
<property name='org.eclipse.equinox.p2.type.root' value='true'/>
</properties>
</iuProperties>
<iuProperties id='myAppA.product.executable.win32.win32.x86' version='3.1.1'>
<properties size='1'>
<property name='unzipped|@artifact|/path/to/product_built' value='/path/to/product_built/eclipsec.exe|/path/to/product_built/myAppA.exe|'/>
</properties>
</iuProperties>
</iusProperties>
...



Is there any chance to make Buckminster build just like PDE does?
Any help will be greatly appreciated.


Kind regards,

M. Emmerling
Re: Updating with P2 from PDE-built to Buckminster-built product [message #957425 is a reply to message #955211] Thu, 25 October 2012 08:02 Go to previous messageGo to next message
Thorsten Meinl is currently offline Thorsten MeinlFriend
Messages: 85
Registered: July 2009
Member
....
> Where the iu property is set to myAppA.product.
> To stop Buckminster from complaining (about "The installable unit
> myAppA.product has not been found.") I had to change the ID in the
> product definition to "myAppA.product".
These seems wrong. This error does not come from Buckminster but rather
from the Eclipse p2 director. There should be no reason to change the
product ID. You need to specify the exact same IU name as in the
content.xml, which should be (also for Buckminster generated sites)
"myAppA.main.product". Try running the p2 directory with that name as IU.

Cheers,

Thorsten
Re: Updating with P2 from PDE-built to Buckminster-built product [message #964355 is a reply to message #957425] Tue, 30 October 2012 13:05 Go to previous message
M. Emmerling is currently offline M. EmmerlingFriend
Messages: 7
Registered: December 2011
Location: Palatinate
Junior Member
Hello Thorsten,

thanks to your help I was able to get stuff working by simply using the product ID declared in the product extension point.

Kind regards,

Max

[Updated on: Tue, 30 October 2012 13:06]

Report message to a moderator

Previous Topic:[solved] Can't install emma.headless
Next Topic:SVN readerType, headless, No component found
Goto Forum:
  


Current Time: Sat Nov 09 01:12:54 GMT 2024

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

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

Back to the top