Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Equinox/p2/Console Users Guide"

< Equinox‎ | p2
m (Install Commands)
m
Line 1: Line 1:
== Using P2 Provisioning Commands ==
+
== 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
+
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.  
managing the repository and profiles, installing and removing components, etc.
+
  
== Prerequisties ==  
+
=== Prerequisties ===
  
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.
+
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.  
  
To run with the provisioning console enabled, make sure that the P2 console bundle is available and started in the process to which you want to connect the console:
+
=== Enabling the Provisioning Commands  ===
  
1. Start the console.
+
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:
 +
<blockquote>1. Start the console.<br/>
 +
2. Find the ID of the P2 console bundle by using the command (in the example "22"):
 +
<blockquote><pre>&gt;ss p2.console
 +
22 RESOLVED org.eclipse.equinox.p2.console_1.0.202
 +
</pre></blockquote>
 +
3. Start the bundle:
 +
<blockquote><pre>&gt; start 22</pre></blockquote>
 +
4. To list all the commands, type '''man''' in the console line. The P2 Provisioning Commands all start with "prov".
 +
</blockquote>
  
2. Find the ID of the P2 console bundle by using the command:
+
== P2 Provisioning Commands  ==
  
''' >ss p2.console ''' <br>
+
==== Repository Commands  ====
'' <bundle ID>    RESOLVED    org.eclipse.equinox.p2.console_1.0.202 ''
+
  
3. Start the bundle:
+
<blockquote>
 +
; provaddrepo <repository URI> : Adds both metadata and artifact repository at URI
  
''' > start <bundle ID> '''
+
; provdelrepo <repository URI> : Deletes metadata and artifact repository at URI
  
4. To list all the commands, type '''man''' in the console line. The P2 Provisioning Commands all start with "prov".
+
; provaddmetadatarepo <repository URI> : Adds a metadata repository at URI
  
== P2 Provisioning Commands ==
+
; provdelmetadatarepo <repository URI> : Deletes a metadata repository at URI
  
==== Repository Commands ====
+
; provaddartifactrepo <repository URI> : Adds an artifact repository at URI
  
provaddrepo <repository URI> - Adds both metadata and artifact repository at URI <br>
+
; provdelartifactrepo <repository URI> : Deletes an artifact repository URI
provdelrepo <repository URI> - Deletes metadata and artifact repository at URI <br>
+
provaddmetadatarepo <repository URI> - Adds a metadata repository at URI <br>
+
provdelmetadatarepo <repository URI> - Deletes a metadata repository at URI <br>
+
provaddartifactrepo <repository URI> - Adds an artifact repository at URI <br>
+
provdelartifactrepo <repository URI> - Deletes an artifact repository URI <br>
+
provlg [<repository URI> <iu id | *> <version range | *>] - Lists all IUs with group capabilities in the given repository or in all repositories if URI is omitted <br>
+
provlr [<repository URI> <iu id | *> <version range | *>] - Lists all metadata repositories, or the contents of a given metadata repository <br>
+
provlar [<repository URI>] - Lists all artifact repositories, or the contents of a given artifact repository <br>
+
provliu [<repository URI | *> <iu id | *> <version range | *>] - Lists the IUs that match the pattern in the given repo.  * matches all <br>
+
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 ====
+
; provlg [<repository URI> <iu id | *> <version range | *>] : Lists all IUs with group capabilities in the given repository or in all repositories if URI is omitted
  
provaddprofile <profileid> <location> <flavor> - Adds a profile with the given profileid, location and flavor <br>
+
; provlr [<repository URI> <iu id | *> <version range | *>] : Lists all metadata repositories, or the contents of a given metadata repository
provdelprofile <profileid> - Deletes a profile with the given profileid <br>
+
provlp [<profileid | *>] - Lists all profiles, or the contents of the profile at the given profile <br>
+
provlgp [<profileid>] - Lists all IUs with group capabilities in the given profile, or current profile if profileid is omitted <br>
+
provlpts [<profileid>] - Lists timestamps for given profile, or if no profileid given then the default profile timestamps are reported <br>
+
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
+
  
==== Install Commands ====
+
; provlar [<repository URI>] : Lists all artifact repositories, or the contents of a given artifact repository
  
provinstall <InstallableUnit> <version> <profileid> - installs an IU to the profileid. If no profileid is given, installs into the default profile.<br>
+
; provliu [<repository URI | *> <iu id | *> <version range | *>] : Lists the IUs that match the pattern in the given repo. * matches all
provremove <InstallableUnit> <version> <profileid> - Removes an IU from the profileid. If no profileid is given, installs into the default profile. <br>
+
provrevert <profileTimestamp> <profileid>] - Reverts to a given profile time stamp for an optional profileId <br>
+
To see the applied configuration changes at runtime, you have to use the "confapply" command.
+
  
Note that the install commands use only the previously added repositories. If your IU is part of a new custom repository, you have to add the repository manually using the "provaddrepo" command.
+
; 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.
 +
</blockquote>
  
[[Category:Equinox p2|Console Users Guide]]
+
==== Profile Registry Commands  ====
 +
 
 +
provaddprofile &lt;profileid&gt; &lt;location&gt; &lt;flavor&gt; - Adds a profile with the given profileid, location and flavor <br> provdelprofile &lt;profileid&gt; - Deletes a profile with the given profileid <br> provlp [&lt;profileid | *&gt;] - Lists all profiles, or the contents of the profile at the given profile <br> provlgp [&lt;profileid&gt;] - Lists all IUs with group capabilities in the given profile, or current profile if profileid is omitted <br> provlpts [&lt;profileid&gt;] - Lists timestamps for given profile, or if no profileid given then the default profile timestamps are reported <br> provlpquery &lt;profileid | this&gt; &lt;expression&gt; [ 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
 +
 
 +
==== Install Commands  ====
 +
 
 +
provinstall &lt;InstallableUnit&gt; &lt;version&gt; &lt;profileid&gt; - installs an IU to the profileid. If no profileid is given, installs into the default profile.<br> provremove &lt;InstallableUnit&gt; &lt;version&gt; &lt;profileid&gt; - Removes an IU from the profileid. If no profileid is given, installs into the default profile. <br> provrevert &lt;profileTimestamp&gt; &lt;profileid&gt;] - Reverts to a given profile time stamp for an optional profileId <br> To see the applied configuration changes at runtime, you have to use the "confapply" command.
 +
 
 +
Note that the install commands use only the previously added repositories. If your IU is part of a new custom repository, you have to add the repository manually using the "provaddrepo" command.
 +
 
 +
[[Category:Equinox_p2|Console Users Guide]]

Revision as of 08:38, 2 February 2011

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.

Prerequisties

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.

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 (in the example "22"):

>ss p2.console
22 RESOLVED org.eclipse.equinox.p2.console_1.0.202

3. Start the bundle:

> start 22

4. To list all the commands, type man in the console line. The P2 Provisioning Commands all start with "prov".

P2 Provisioning Commands

Repository Commands

provaddrepo <repository URI> 
Adds both metadata and artifact repository at URI
provdelrepo <repository URI> 
Deletes metadata and artifact repository at URI
provaddmetadatarepo <repository URI> 
Adds a metadata repository at URI
provdelmetadatarepo <repository URI> 
Deletes a metadata repository at URI
provaddartifactrepo <repository URI> 
Adds an artifact repository at URI
provdelartifactrepo <repository URI> 
Deletes an artifact repository URI
provlg [<repository URI> <iu id | *> <version range | *>] 
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

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

Install Commands

provinstall <InstallableUnit> <version> <profileid> - installs an IU to the profileid. If no profileid is given, installs into the default profile.
provremove <InstallableUnit> <version> <profileid> - Removes an IU from the profileid. If no profileid is given, installs into the default profile.
provrevert <profileTimestamp> <profileid>] - Reverts to a given profile time stamp for an optional profileId
To see the applied configuration changes at runtime, you have to use the "confapply" command.

Note that the install commands use only the previously added repositories. If your IU is part of a new custom repository, you have to add the repository manually using the "provaddrepo" command.

Back to the top