Revision as of 07:49, 3 February 2011

Contents

Using P2 Provisioning Commands

The P2 Provisioning Commands are console commands enabled by the presence of P2 that allow you to perform common provisioning operations, such as managing the repository and profiles, installing and removing components, etc.

Prerequisites

To have the Eclipse console available, you have to add -console as a program argument either in the Eclipse.ini file of your default Eclipse installation, or, in the Argument tab in your Eclipse IDE. See Eclipse Runtime Options for more details

Enabling the Provisioning Commands

To run with the provisioning console commands enabled, make sure that the P2 console bundle is available and started in the process to which you want to connect the console:

1. Start the console.

2. Find the ID of the P2 console bundle by using the command ss (in the example below the P2 console bundle ID is "68"):

Lists all IUs with group capabilities in the given repository or in all repositories if URI is omitted

provlr [<repository URI> <iu id | *> <version range | *>]

Lists all metadata repositories, or the contents of a given metadata repository

provlar [<repository URI>]

Lists all artifact repositories, or the contents of a given artifact repository

provliu [<repository URI | *> <iu id | *> <version range | *>]

Lists the IUs that match the pattern in the given repo. * matches all

provlquery <repository URI | *> <expression> [ true | false ]

Lists the IUs that match the query expression in the given repo. * matches all. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query.

Profile Registry Commands

Parameters

profileid : ID of the profile (for example: SDKProfile)

location : Location of the profile

flavor : Profile flavor (for example: tooling)

expression : P2QL expression

provaddprofile <profileid> <location> <flavor>

Adds a profile with the given profileid, location and flavor

provdelprofile <profileid>

Deletes a profile with the given profileid

provlp [<profileid | *>]

Lists all profiles, or the contents of the profile at the given profile

provlgp [<profileid>]

Lists all IUs with group capabilities in the given profile, or current profile if profileid is omitted

provlpts [<profileid>]

Lists timestamps for given profile, or if no profileid given then the default profile timestamps are reported

provlpquery <profileid | this> <expression> [ true | false ]

Lists the IUs that match the query expression in the given profile. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query