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 Touchpoint Instructions"

Line 1: Line 1:
 
{{CommentBox|Please review content}}
 
{{CommentBox|Please review content}}
  
A P2 installable Unit (IU) can be installed into one touchpoint. The IU meta data consists of a reference to the touchpoint (Touchpoint Type), and describes a set of actions/instructions to execute on the referenced touchpoint. Currently, two touchpoints (native, and eclipse) have been implemented. The native touchpoint has aprox 5 different actions, and the eclipse touchpoint has aprox 20. Some of these actions take parameters. The actions and parameters are encoded in a Map where they keys are the references to actions, and the value is a single parameter, or a map of multiple parameters. This wiki page describes the two touchpoints, and the instructions they understand.
+
A P2 installable Unit (IU) is installed using the facilities provided by a ''touchpoint''. The IU metadata consists of a reference to the touchpoint (Touchpoint Type), and describes a set of actions/instructions to execute on the referenced touchpoint. Currently, two touchpoints (native, and eclipse) have been implemented. The native touchpoint has aprox 5 different actions, and the eclipse touchpoint has aprox 20. Some of these actions take parameters. The actions and parameters are encoded in a Map where they keys are the references to actions, and the value is a single parameter, or a map of multiple parameters. This wiki page describes the two touchpoints, and the instructions they understand.
  
 
=Native Touchpoint=
 
=Native Touchpoint=
Line 14: Line 14:
 
| style="font-weight:bold;font-family:monospace"|cleanupzip
 
| style="font-weight:bold;font-family:monospace"|cleanupzip
 
| <code>source, target</code>
 
| <code>source, target</code>
| removes unzipped files and directoreis that where unzipped from ''source'' into ''target'' - i.e. an "undo operation" of an ''unzip'' instruction.
+
| removes unzipped files and directories that where unzipped from ''source'' into ''target'' - i.e. an "undo operation" of an ''unzip'' instruction.
 
|- valign="top"
 
|- valign="top"
 
{{Command|unzip}}
 
{{Command|unzip}}
Line 25: Line 25:
 
|- valign="top"
 
|- valign="top"
 
{{Command|collect}}
 
{{Command|collect}}
{{Parameters|}}
+
{{Parameters|-}}
|{{CommentBox|Need help to describe what this action does - it seems to add the needed artifacts from an installable unit that is replacing another, to a set of artifacts to download from an artifact repository. The instruction does not seem to take any parameters other than those already injected by the engine.}}
+
|collects all associated artifacts for an IU and places them in a local touchpoint addressable cache. This action is not meant to be called directly and is used as part of the main Collect and Sizing phases.
 
|- valign="top"
 
|- valign="top"
 
{{Command|link}}
 
{{Command|link}}
Line 42: Line 42:
 
{{Command|collect}}
 
{{Command|collect}}
 
{{Parameters|-}}
 
{{Parameters|-}}
| {{CommentBox|Need help to describe what this instructions does (probably the same as the native touchpoint 'collect'}}
+
|collects all associated artifacts for an IU and places them in a local touchpoint addressable cache. This action is not meant to be called directly and is used as part of the main Collect and Sizing phases.
 
|-valign="top"
 
|-valign="top"
 
{{Command|installBundle}}
 
{{Command|installBundle}}
Line 70: Line 70:
 
{{Command|setLauncherName}}
 
{{Command|setLauncherName}}
 
{{Parameters|name}}
 
{{Parameters|name}}
| Sets the name of the launcher to <code>name</code>. {{CommentBox|Can someone help with a better explanation? Example?}}
+
| Sets the name of the launcher to <code>name</code>. The launcher name is used to configure launcher name specific ini files.
 
|-valign="top"
 
|-valign="top"
 
{{Command|addProgramArgument}}
 
{{Command|addProgramArgument}}
 
{{Parameters|programArg}}
 
{{Parameters|programArg}}
| Adds the string specified in the parameter ''programArg'' as an argument to the program. If the parameters is the special value <code>@artifact</code>, the location of the artifact referenced by the first artifact key in the IU is used as the parameter value. {{CommentBox|Is this description correct?}}
+
| Adds the string specified in the parameter ''programArg'' as an argument to the program. If the parameters is the special value <code>@artifact</code>, the location of the artifact referenced by the first artifact key in the IU is used as the parameter value.  
 
|-valign="top"
 
|-valign="top"
 
{{Command|removeProgramArgument}}
 
{{Command|removeProgramArgument}}
Line 90: Line 90:
 
{{Command|setFrameworkDependentProperty}}
 
{{Command|setFrameworkDependentProperty}}
 
{{Parameters|propName, propValue}}
 
{{Parameters|propName, propValue}}
| Sets the framework dependant property named ''propName'' to the value specified in ''propValue''. {{CommentBox|What is a FW dependant property BTW?}}
+
| Sets the framework dependant property named ''propName'' to the value specified in ''propValue''. Framework dependent properties are properties specific to the Equinox implementation of the OSGi framework.
 
|-valign="top"
 
|-valign="top"
 
{{Command|setFrameworkIndependentProperty}}
 
{{Command|setFrameworkIndependentProperty}}
 
{{Parameters|propName, propValue}}
 
{{Parameters|propName, propValue}}
| Sets the framework independant property named ''propName'' to the value specified in ''propValue''. {{CommentBox|What is a FW independant property BTW?}}
+
| Sets the framework independant property named ''propName'' to the value specified in ''propValue''. Framework independent properties do not specifically target Eclipse and are generally applicable to other OSGi frameworks.
 
|-valign="top"
 
|-valign="top"
 
{{Command|setProgramProperty}}
 
{{Command|setProgramProperty}}
 
{{Parameters|propName, propValue}}
 
{{Parameters|propName, propValue}}
| Sets the program property named ''propName'' to the value specified in ''propValue''. {{CommentBox|What is a program property BTW?}}
+
| Sets the program property named ''propName'' to the value specified in ''propValue''. Program properties are used by the executable program to among other things locate the jars needed to start Eclipse.
 
|-valign="top"
 
|-valign="top"
 
{{Command|addJVMArg}}
 
{{Command|addJVMArg}}
Line 126: Line 126:
 
{{Command|checkTrust}}
 
{{Command|checkTrust}}
 
{{Parameters|}}
 
{{Parameters|}}
| {{CommentBox|Nedd help describing what this instruction does...}}
+
|collects the set of bundle files on which the signature trust check should be performed. The checkTrust action is not meant to be user callable and is done as part of the CheckTrust phase.
 
|}
 
|}
 
[[Category:Equinox p2|Metadata Authoring]]
 
[[Category:Equinox p2|Metadata Authoring]]

Revision as of 12:52, 20 June 2008

Please review content

A P2 installable Unit (IU) is installed using the facilities provided by a touchpoint. The IU metadata consists of a reference to the touchpoint (Touchpoint Type), and describes a set of actions/instructions to execute on the referenced touchpoint. Currently, two touchpoints (native, and eclipse) have been implemented. The native touchpoint has aprox 5 different actions, and the eclipse touchpoint has aprox 20. Some of these actions take parameters. The actions and parameters are encoded in a Map where they keys are the references to actions, and the value is a single parameter, or a map of multiple parameters. This wiki page describes the two touchpoints, and the instructions they understand.

Native Touchpoint

The native touchpoint is used to install things "outside of eclipse".

instruction parameters description
cleanupzip source, target removes unzipped files and directories that where unzipped from source into target - i.e. an "undo operation" of an unzip instruction.
unzip source, target unzips the source into the target directory. The source can be the special @artifact source path, which denotes the download cache location for the first artifact key in the IU. Comments in code indicates that the use of @artifact may be deprecated.
chmod targetDir, targetFile, permissions changes mode on the targetFile in the targetDir (a path), permissions is written the same way as to the system command chmod,
collect - collects all associated artifacts for an IU and places them in a local touchpoint addressable cache. This action is not meant to be called directly and is used as part of the main Collect and Sizing phases.
link targetDir, linkTarget, linkName, force Performs the system action ln -s with the parameters linkTarget being the source-file, targetDir is the directory where the symbolic link will be created, and linkName is the name of the resulting link in the targetDir. The force parameter is a boolean in string form (i.e. "true"/"false") and indicates if an existing link with the same name should be removed before the new link is created.
the parameter names are quite confusing

Eclipse Touchpoint

instruction parameters description
collect - collects all associated artifacts for an IU and places them in a local touchpoint addressable cache. This action is not meant to be called directly and is used as part of the main Collect and Sizing phases.
installBundle bundle Installs a bundle artifact specified by the parameter bundle
uninstallBundle bundle Uninstalls a bundle artifact with a bundle-id specified by the paramter bundle
addSourceBundle bundle Installs a source bundle artifact with the bundle-id specified by the parameter bundle
removeSourceBundle bundle Removes/uninstalls the source bundle artifact with the bundle-id specified by the parameter bundle
installFeature feature, featureId, version Installs the feature referenced by the parameter feature (matched against artifacts in the iu). The feature is installed with the id specified by the parameter featureId, or if this parameter has the value default, with the id specified in the artifact referenced by feature. The features is installed with the version specified in version, or with the version specified in the artifact referenced by the feature parameter if the version parameter has the value default
uninstallFeature feature, featureId, version Uninstalls a feature. Parameters have the same meaning as for the command installFeature
setLauncherName name Sets the name of the launcher to name. The launcher name is used to configure launcher name specific ini files.
addProgramArgument programArg Adds the string specified in the parameter programArg as an argument to the program. If the parameters is the special value @artifact, the location of the artifact referenced by the first artifact key in the IU is used as the parameter value.
removeProgramArgument programArg Removes the program argument specified in the string programArg - if the parameters is the special value @artifact, the location of the artifact referenced by the first artifact key in the IU is used as the parameter value.
setStartLevel startLevel Sets the start level to the integer value specified in the parameter startValue
markStarted started Marks the bundle referenced by the first artifact key in the IU as started / not started, as controlled by the boolean parameter started (in string form i.e. "true"/"false").
setFrameworkDependentProperty propName, propValue Sets the framework dependant property named propName to the value specified in propValue. Framework dependent properties are properties specific to the Equinox implementation of the OSGi framework.
setFrameworkIndependentProperty propName, propValue Sets the framework independant property named propName to the value specified in propValue. Framework independent properties do not specifically target Eclipse and are generally applicable to other OSGi frameworks.
setProgramProperty propName, propValue Sets the program property named propName to the value specified in propValue. Program properties are used by the executable program to among other things locate the jars needed to start Eclipse.
addJVMArg jvmArg Adds the string specified in the parameter jvmArg to the arguments passed to the JVM.
removeJVMArg jvmArg Removes the string specified in the parameter jvmArg from the arguments passed to the JVM.
mkdir path Creates the directory specified by the parameter path.
rmdir path Removes the directory specified by the parameter path.
link targetDir, linkTarget, linkName, force Performs the system action ln -s with the parameters linkTarget being the source-file, targetDir is the directory where the symbolic link will be created, and linkName is the name of the resulting link in the targetDir. The force parameter is a boolean in string form (i.e. "true"/"false") and indicates if an existing link with the same name should be removed before the new link is created. If the parameter targetDir is set to the special value @artifact, the source is the file specified by the first artifact key in the IU.
the parameter names are quite confusing
chmod targetDir, targetFile, permissions Changes permission on a file using the system chmod command. The targetDir parameter is either a path, or the special @artifact which is a reference to the directory where the first artifact included in the installable unit is located. The parameter targetFile is the name of a file, and permissions is written like for the chmod system command.
checkTrust collects the set of bundle files on which the signature trust check should be performed. The checkTrust action is not meant to be user callable and is done as part of the CheckTrust phase.

Back to the top