Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] How to specify the location of bundles.info to update during a feature installation using P2 Director

Hi Paul and all,

In my POC I'm creating 2 Profiles (ProfileA, ProfileB) and as Paul indicated I'm now using -destination parameter to give the target location separately based on the Profile id.
(I'm not using -shared param to define the p2-location because it then gets hard-coded in the config.ini file for p2.data.area.)

So I'm only changing the destination based on the Profile ID
eg:
-destination {path}/target/components/ProfileA -profile ProfileA
-destination {path}/target/components/ProfileB -profile ProfileB

Now my target product's directory structure should look like below;

target
|-plugins
|-features
|-components

  |--ProfileA
  |    |-p2
  |       /org.eclipse.equinox.p2.engine/profileRegistry/ProfileA.profile
  |    |-configuration
  |       /config.ini
  |       /org.eclipse.equinox.simpleconfigurator/bundles.info
  |--ProfileB
  |    |-p2
  |        /org.eclipse.equinox.p2.engine/profileRegistry/ProfileB.profile
  |    |-configuration
  |       /config.ini
  |       /org.eclipse.equinox.simpleconfigurator/bundles.info

To materialize ProfileA I first parse & materialize a .product configuration (A.product) and then install features onto it using p2-director.
So in the first cycle of p2-director execution ProfileA should be created with the config.ini, bundles.info and the base set of features installed.
The config.ini generated for Profile A has below entries;

eclipse.p2.profile="">osgi.framework=file\:plugins/org.eclipse.osgi_3.7.0.v20110613.jar
equinox.use.ds=true
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502-1955.jar@1\:start
org.eclipse.equinox.simpleconfigurator.useReference=true
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=A.product
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=@config.dir/../p2/
eclipse.application=A.application


ProfileB should contain (base set of Features in profileA + some new set of features).
So I assumed without using a separate .product configuration to materialize ProfileB I can re-use the same bundle.info and config.ini file generated for ProfileA above by moving them inside ProfileB/configuration and execute p2-director (with -destination {path}/target/components/ProfileB -profile ProfileB)to install the new set of features to ProfileB.
(Here I manually change the config.ini value : eclipse.p2.profile="">).

Although the features get installed to the /ProfileB.profile, the bundles.info file in ProfileB doesn't get updated with the new bundles.
Any idea what I'm doing wrong here?
Do I need a separate .product file to be used to materialize ProfileB? I'm using a maven-based-plugin (which uses tycho under-the hood) to create this product structure.

Perhaps I'm going way-off from achieving a multiple-profile build in my target application. Please share your ideas, suggestions to get back on correct track. :)

Thanks,
Dileepa

On Mon, Feb 11, 2013 at 2:32 AM, Dileepa Jayakody <dileepa@xxxxxxxx> wrote:
Thanks a lot Paul for your insight on this. I get a clear picture on how P2 director works now with your examples :)

Regards,
Dileepa

On Fri, Feb 8, 2013 at 7:41 PM, Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx> wrote:
On Fri, Feb 8, 2013 at 5:31 AM, Dileepa Jayakody <dileepa@xxxxxxxx> wrote:
Hi All,

Can someone give some help on this please?
I  would like to know how P2-Director finds the bundles.info file to update during a feature installation. 

The bundles.info is in the simpleconfigurator config data location, and I don't see how the director can update it unless it is updating its own install.  If anything, it would be tied to the -destination argument, not the -profile one.

I don't believe you can have multiple profiles within one configuration area, as you need one configuration area to completely launch one eclipse application.

You could, however, create a shared bundle pool and multiple contained target areas:


$ECLIPSE372 -application org.eclipse.equinox.p2.director \
-noSplash -bundlepool /opt/local/eclipse/dirExp/eclipse \
-shared /opt/local/eclipse/dirExp/eclipse/p2 \
-destination /opt/local/eclipse/dirExp/eclipse/win32_win32_x86 \
-profile SDKProfile_win32_win32_x86 \
-profileProperties org.eclipse.update.install.features=true \
-p2.os win32 -p2.ws win32 -p2.arch x86 -roaming \
-repository file:///opt/local/eclipse/dirExp/eclipseRepo \
-installIUs org.eclipse.sdk.ide $ECLIPSE372 -application org.eclipse.equinox.p2.director \
-noSplash -bundlepool /opt/local/eclipse/dirExp/eclipse \
-shared /opt/local/eclipse/dirExp/eclipse/p2 -destination \
/opt/local/eclipse/dirExp/eclipse/linux_gtk_x86_64 \
-profile SDKProfile_linux_gtk_x86_64 \
-profileProperties org.eclipse.update.install.features=true \
-p2.os linux -p2.ws gtk -p2.arch x86_64 -roaming \
-repository file:///opt/local/eclipse/dirExp/eclipseRepo \
-installIUs org.eclipse.sdk.ide


--
Paul Webster
Hi floor.  Make me a sammich! - GIR

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev




Back to the top