[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Debugging p2.inf matching

My only suggest regarding debugging is to look at the content.xml file generated by the build and make sure that it contains the expected IUs.
(ie the existence of the configure.net.beaconcontroller.logging.bridge IU and a dependency from the product IU to it).

This will at least let you know if there were problems with the p2.inf.  I believe that if there are typos/problems in this file then it ends up getting ignored.

One potential problem here may be the use of $version$ in the requirements from the configure IU to the bundle:
units.0.hostRequirements.1.name=net.beaconcontroller.logging.bridge
units.0.hostRequirements.1.range=[$version$,$version$]
units.0.hostRequirements.1.greedy=false
units.0.requires.1.name=net.beaconcontroller.logging.bridge
units.0.requires.1.range=[$version$,$version$]
units.0.requires.1.greedy=false


Here, the $version$ will be replaced with the version of the product, this may be different from the version of the bundle you are referring to.  These ranges should match the version on the net.beaconcontroller.logging.bridge bundle, you may need to directly write something like [3.8.0, 3.8.1)

-Andrew


From:        David Erickson <halcyon1981@xxxxxxxxx>
To:        P2 developer discussions <p2-dev@xxxxxxxxxxx>
Date:        06/29/2012 02:18 PM
Subject:        [p2-dev] Debugging p2.inf matching
Sent by:        p2-dev-bounces@xxxxxxxxxxx




Hi all-
I am building a product (and also hoping to be able to launch the
product within Eclipse) and trying to use p2.inf within a feature to
control the start level for certain bundles.  However the built
product's config.ini is not reflecting these changes and I am
wondering what the best way to find out why this is not working would
be (debug logs, actual debugging, etc).  Any help would be
appreciated.  I'm also embedding my p2.inf, nearly direct copy and
paste from (
http://wiki.eclipse.org/Equinox/p2/Setting_Start_Levels)
with the bundle's name changed to the one I am trying to start:

#create a requirement on the fragment we are creating
requires.0.namespace=org.eclipse.equinox.p2.iu
requires.0.name=configure.net.beaconcontroller.logging.bridge
requires.0.range=[$version$,$version$]
requires.0.greedy=true

#create a IU fragment named configure.org.example.bundle
units.0.id=configure.net.beaconcontroller.logging.bridge
units.0.version=$version$
units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
units.0.provides.1.name=configure.net.beaconcontroller.logging.bridge
units.0.provides.1.version=$version$
units.0.instructions.install=org.eclipse.equinox.p2.touchpoint.eclipse.installBundle(bundle:${artifact});
units.0.instructions.uninstall=org.eclipse.equinox.p2.touchpoint.eclipse.uninstallBundle(bundle:${artifact});
units.0.instructions.unconfigure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:-1);
\

org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:false);
units.0.instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:1);
\

org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:true);
units.0.hostRequirements.1.namespace=osgi.bundle
units.0.hostRequirements.1.name=net.beaconcontroller.logging.bridge
units.0.hostRequirements.1.range=[$version$,$version$]
units.0.hostRequirements.1.greedy=false
units.0.hostRequirements.2.namespace=org.eclipse.equinox.p2.eclipse.type
units.0.hostRequirements.2.name=bundle
units.0.hostRequirements.2.range=[0.0.0,2.0.0)
units.0.hostRequirements.2.greedy=false
units.0.requires.1.namespace=osgi.bundle
units.0.requires.1.name=net.beaconcontroller.logging.bridge
units.0.requires.1.range=[$version$,$version$]
units.0.requires.1.greedy=false

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