Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [P2] Avoid recreation of config.ini, update other files then Bundles
[P2] Avoid recreation of config.ini, update other files then Bundles [message #129059] Tue, 14 April 2009 15:40 Go to next message
Andre Hanika is currently offline Andre HanikaFriend
Messages: 6
Registered: July 2009
Junior Member
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?

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?

Thanks for every hint,
André
Re: [P2] Avoid recreation of config.ini, update other files then Bundles [message #129081 is a reply to message #129059] Tue, 14 April 2009 16:23 Go to previous messageGo to next message
Susan F. McCourt is currently offline Susan F. McCourtFriend
Messages: 16
Registered: July 2009
Junior Member
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.

>
> 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
Re: [P2] Avoid recreation of config.ini, update other files then Bundles [message #129292 is a reply to message #129081] Thu, 16 April 2009 12:07 Go to previous messageGo to next message
Andre Hanika is currently offline Andre HanikaFriend
Messages: 6
Registered: July 2009
Junior Member
Susan McCourt schrieb:
> 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
Re: [P2] Avoid recreation of config.ini, update other files then Bundles [message #1714413 is a reply to message #129292] Thu, 12 November 2015 13:43 Go to previous message
ilke Muhtaroglu is currently offline ilke MuhtarogluFriend
Messages: 33
Registered: September 2015
Member
In my project I have the same issue with an update. After an update config.ini file is overrided and we loose the information we have written to config.ini file ? Is there a way not to update certain key-value values in config.ini file. It is okey to have an update for some fields but we want to keep some key-value pairs as they are set by the user such like a path to a file. When we update the eclipse config.ini file is overriden and we loose the information we kept. Is there a solution to this ? What are the possible solutions ?

Sincerely
Previous Topic:Development of dropins bundle deployment capability
Next Topic:Configuring a ManagedServiceFactory with org.eclipse.equinox.cm
Goto Forum:
  


Current Time: Tue Sep 25 10:41:11 GMT 2018

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

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

Back to the top