Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[P2] Avoid recreation of config.ini, update other files then Bundles
https://www.eclipse.org/forums/index.php/mv/msg/39693/129059/#msg_129059
After lot of research around p2 (Google, Wiki) I still have some
questions, where I have not found an answer so far.
1.) How to avoid the recreation of a new config.ini after p2 has updated
my application?
To make the prestartupdate example run, I have to edit the config.ini and
add the following entry
"reference\:file\:org.eclipse.equinox.p2.examples.rcp.prestartupdate@start"
as described on the page. But after I exported a new version and the
prestartupdate application updates, a new config.ini file is created every
time, where my added entry is missing of course. Can I disable this
feature, or do I have to edit the config.ini file somewhere else?
2.) How to update other files then just Bundles?
Lets say if I would like to update the JRE we shipped with the application
or the config.ini file or the splash.bmp or just something else then a
Bundle. Is this possible? How?
The .product file for the build is used to specify start levels of
bundles in the product. When the product is build, the correct
config.ini will get provisioned. One of these days I'll make a sample
releng project for the headless startup example, I just haven't had a
chance.
>
> 2.) How to update other files then just Bundles?
> Lets say if I would like to update the JRE we shipped with the
> application or the config.ini file or the splash.bmp or just something
> else then a Bundle. Is this possible? How?
This is possible. For file updates, you must generate metadata (an IU)
that describes the file. This is not my forte, but the wiki pages
should explain how. If you are expecting the existing p2 UI "out of
the box" to find this update, then you would want to make sure that
there was a corresponding installed feature that updated itself to
include the new file. If you are doing your own updating, then that
doesn't matter. You just need to make sure the IU representing the file
is passed to the planner when checking for updates. The example looks
for updates to every single IU in the profile.
The config.ini is generated by p2, so you would not update this file per
se. You would want to create IU's that change the configuration data
(these are called "Configuration Units" or CUs). Again, this is not my
forte, I'm doing a bit of handwaving here...there should be some info on
the wiki or perhaps a p2 core person can elaborate.
susan]]>Susan F. McCourt2009-04-14T16:23:42-00:00Re: [P2] Avoid recreation of config.ini, update other files then Bundles
https://www.eclipse.org/forums/index.php/mv/msg/39693/129292/#msg_129292
> Andre Hanika wrote:
>> Hi All
>> After lot of research around p2 (Google, Wiki) I still have some
>> questions, where I have not found an answer so far.
>>
>> 1.) How to avoid the recreation of a new config.ini after p2 has
>> updated my application?
>> To make the prestartupdate example run, I have to edit the config.ini
>> and add the following entry
>> "reference\:file\:org.eclipse.equinox.p2.examples.rcp.prestartupdate@start"
>> as described on the page. But after I exported a new version and the
>> prestartupdate application updates, a new config.ini file is created
>> every time, where my added entry is missing of course. Can I disable
>> this feature, or do I have to edit the config.ini file somewhere else?
>
> The .product file for the build is used to specify start levels of
> bundles in the product. When the product is build, the correct
> config.ini will get provisioned. One of these days I'll make a sample
> releng project for the headless startup example, I just haven't had a
> chance.
>
After setting the startlevel on the product configuration page and a new
prestartupdate.releng build I had following sideeffects:
1.) Now the config.ini of the exported application has all bundles
listed with startlevel 4. No matter which bundle or which startlevel I
set in the product configuration, it is ignored.
2.) The bundle.info and the org.eclipse.equinox.simpleconfigurator
folder are not generated anymore.
(I am developing with eclipse 3.5M6)
>>
>> 2.) How to update other files then just Bundles?
>> Lets say if I would like to update the JRE we shipped with the
>> application or the config.ini file or the splash.bmp or just something
>> else then a Bundle. Is this possible? How?
>
> This is possible. For file updates, you must generate metadata (an IU)
> that describes the file. This is not my forte, but the wiki pages
> should explain how. If you are expecting the existing p2 UI "out of
> the box" to find this update, then you would want to make sure that
> there was a corresponding installed feature that updated itself to
> include the new file. If you are doing your own updating, then that
> doesn't matter. You just need to make sure the IU representing the file
> is passed to the planner when checking for updates. The example looks
> for updates to every single IU in the profile.
>
> The config.ini is generated by p2, so you would not update this file per
> se. You would want to create IU's that change the configuration data
> (these are called "Configuration Units" or CUs). Again, this is not my
> forte, I'm doing a bit of handwaving here...there should be some info on
> the wiki or perhaps a p2 core person can elaborate.
>
> susan
I tried to add a JRE via the prodcut launching tab, but this is ignored
by the prestartupdate.releng build as well, so the JRE is not within the
generated zip file. But if the export goes over the product overview
page, then the JRE is included.
I will try this again with a newer Nightlybuild.
Cheers Andre]]>Andre Hanika2009-04-16T12:07:49-00:00Re: [P2] Avoid recreation of config.ini, update other files then Bundles
https://www.eclipse.org/forums/index.php/mv/msg/39693/1714413/#msg_1714413
Sincerely]]>ilke Muhtar2015-11-12T13:43:04-00:00