Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Can Repo folder be used as update site?
Can Repo folder be used as update site? [message #58803] Wed, 29 April 2009 15:07 Go to next message
michael.sacarny is currently offline michael.sacarnyFriend
Messages: 103
Registered: July 2009
Location: USA
Senior Member
We build our RCP product based on SDK 3.5M6 headlessly as in
http://aniefer.blogspot.com/2008/06/example-headless-build-f or-rcp-product.html.
I would like to create an update site for this product, so each time we
build a new release, users could update to latest components.

I noticed that during product build, a P2 metadata respository is
generated in the <buildDirectory>\repo folder. Is this suitable for
posting as an update site? Although site.xml is missing, I have been able
to update an installed product with it. The only problem I see so far is
that the repo version of config.ini lacks some entries such as
eclipse.p2.data.area and org.eclipse.update.reconcile, and some tweaks
that we apply after the build.

So, if we copy our final config.ini into the repo, is it "correct" to use
it as an update site? On the other hand, if the repo site is not ok to
use, what is the recommended way to build an update site given that we
have a headless script for product build and want to leverage this to the
extent possible.

Thanks,
Mike
Re: Can Repo folder be used as update site? [message #58908 is a reply to message #58803] Wed, 29 April 2009 18:56 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Yes, this is a p2 repository, which is the replacement for old update
sites. Instead of a site.xml, there should be content.xml (or .jar) and
artifact.xml.

Old update manager won't be able to update from it, but it is a proper
p2 site.


For the config.ini, generally when doing p2 installs, this is a managed
file. Technically this should not even be present in the artifacts
being delivered from the site, but instead should be completely
generated by p2 (during update or install). The fact that it is there
is because of how the metadata generation worked in 3.4.

For the p2 updates to work properly, you should make sure the contents
of the config.ini are properly captured in the content.xml. Generally
this means having the config.ini in the build have the correct contents
before the metadata generation is run. You can try doing this in
customAssembly, post.gather.bin.parts. The root files (including
config.ini) will have been collected into folders:
${eclipse.base}/win32.win32.x86/${collectingFolder}
you could try
${eclipse.base}/${os}.${ws}.${arch}/${collectingFolder}

-Andrew


msacarny wrote:
> We build our RCP product based on SDK 3.5M6 headlessly as in
> http://aniefer.blogspot.com/2008/06/example-headless-build-f or-rcp-product.html.
> I would like to create an update site for this product, so each time we
> build a new release, users could update to latest components.
>
> I noticed that during product build, a P2 metadata respository is
> generated in the <buildDirectory>\repo folder. Is this suitable for
> posting as an update site? Although site.xml is missing, I have been
> able to update an installed product with it. The only problem I see so
> far is that the repo version of config.ini lacks some entries such as
> eclipse.p2.data.area and org.eclipse.update.reconcile, and some tweaks
> that we apply after the build.
>
> So, if we copy our final config.ini into the repo, is it "correct" to
> use it as an update site? On the other hand, if the repo site is not ok
> to use, what is the recommended way to build an update site given that
> we have a headless script for product build and want to leverage this to
> the extent possible.
>
> Thanks,
> Mike
>
>
Re: Can Repo folder be used as update site? [message #58981 is a reply to message #58908] Thu, 30 April 2009 17:56 Go to previous message
michael.sacarny is currently offline michael.sacarnyFriend
Messages: 103
Registered: July 2009
Location: USA
Senior Member
Andrew,
Thanks for your reply! I'm closer, but have some remaining sticky issues
before using Repo to upgrade. Again, this is all on an RCP Product,
Feature-based, with 3.5M6:
- I can set the following in config.ini in the post.gather.bin.parts
target and they propagate to the Product zip config.ini as well as in a
Product upgraded to the Repo:
osgi.instance.area.default=@user.home/<some folder>
osgi.framework.extensions=org.eclipse.equinox.transforms.hoo k
osgi.configuration.cascaded=false

- However, changes to osgi.bundles in post.gather.bin.parts do not
propagate to the Product config.ini or to an upgraded Product. For
example, I must set start level for transform bundles:
osgi.bundles=org.eclipse.equinox.transforms.xslt@1:start,
org.eclipse.equinox.transforms.xslt.plugin@1:start,
org.eclipse.equinox.simpleconfigurator@1:start

- I tried to set Start level in the Product, Configuration tab but that
does not seem to work for Feature-based Products.

- Finally, our Product very often builds with a missing dropins folder. (I
think this is Bug #252284.) I fix this by creating the folder and also
setting the org.eclipse.equinox.p2.reconciler.dropins entry in
bundles.info "true". If I make the change to bundles.info in
post.gather.bin.parts, it seems to persist. If I upgrade to a Repo with
this change, however, the dropins folder is missing in the upgraded
Product.

Any suggestions on how I can resolve these issues?
Thanks, msacarny
Re: Can Repo folder be used as update site? [message #596534 is a reply to message #58803] Wed, 29 April 2009 18:56 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Yes, this is a p2 repository, which is the replacement for old update
sites. Instead of a site.xml, there should be content.xml (or .jar) and
artifact.xml.

Old update manager won't be able to update from it, but it is a proper
p2 site.


For the config.ini, generally when doing p2 installs, this is a managed
file. Technically this should not even be present in the artifacts
being delivered from the site, but instead should be completely
generated by p2 (during update or install). The fact that it is there
is because of how the metadata generation worked in 3.4.

For the p2 updates to work properly, you should make sure the contents
of the config.ini are properly captured in the content.xml. Generally
this means having the config.ini in the build have the correct contents
before the metadata generation is run. You can try doing this in
customAssembly, post.gather.bin.parts. The root files (including
config.ini) will have been collected into folders:
${eclipse.base}/win32.win32.x86/${collectingFolder}
you could try
${eclipse.base}/${os}.${ws}.${arch}/${collectingFolder}

-Andrew


msacarny wrote:
> We build our RCP product based on SDK 3.5M6 headlessly as in
> http://aniefer.blogspot.com/2008/06/example-headless-build-f or-rcp-product.html
> I would like to create an update site for this product, so each time we
> build a new release, users could update to latest components.
>
> I noticed that during product build, a P2 metadata respository is
> generated in the <buildDirectory>\repo folder. Is this suitable for
> posting as an update site? Although site.xml is missing, I have been
> able to update an installed product with it. The only problem I see so
> far is that the repo version of config.ini lacks some entries such as
> eclipse.p2.data.area and org.eclipse.update.reconcile, and some tweaks
> that we apply after the build.
>
> So, if we copy our final config.ini into the repo, is it "correct" to
> use it as an update site? On the other hand, if the repo site is not ok
> to use, what is the recommended way to build an update site given that
> we have a headless script for product build and want to leverage this to
> the extent possible.
>
> Thanks,
> Mike
>
>
Re: Can Repo folder be used as update site? [message #596564 is a reply to message #58908] Thu, 30 April 2009 17:56 Go to previous message
michael.sacarny is currently offline michael.sacarnyFriend
Messages: 103
Registered: July 2009
Location: USA
Senior Member
Andrew,
Thanks for your reply! I'm closer, but have some remaining sticky issues
before using Repo to upgrade. Again, this is all on an RCP Product,
Feature-based, with 3.5M6:
- I can set the following in config.ini in the post.gather.bin.parts
target and they propagate to the Product zip config.ini as well as in a
Product upgraded to the Repo:
osgi.instance.area.default=@user.home/<some folder>
osgi.framework.extensions=org.eclipse.equinox.transforms.hoo k
osgi.configuration.cascaded=false

- However, changes to osgi.bundles in post.gather.bin.parts do not
propagate to the Product config.ini or to an upgraded Product. For
example, I must set start level for transform bundles:
osgi.bundles=org.eclipse.equinox.transforms.xslt@1:start,
org.eclipse.equinox.transforms.xslt.plugin@1:start,
org.eclipse.equinox.simpleconfigurator@1:start

- I tried to set Start level in the Product, Configuration tab but that
does not seem to work for Feature-based Products.

- Finally, our Product very often builds with a missing dropins folder. (I
think this is Bug #252284.) I fix this by creating the folder and also
setting the org.eclipse.equinox.p2.reconciler.dropins entry in
bundles.info "true". If I make the change to bundles.info in
post.gather.bin.parts, it seems to persist. If I upgrade to a Repo with
this change, however, the dropins folder is missing in the upgraded
Product.

Any suggestions on how I can resolve these issues?
Thanks, msacarny
Previous Topic:Problem with the function "selectionChanged"
Next Topic:How to specify "categories" for products?
Goto Forum:
  


Current Time: Sun Jun 13 18:57:22 GMT 2021

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

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

Back to the top