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 data paths"

(Current State)
Line 10: Line 10:
 
** artifacts/ (containing the agent's artifact repository - AgentLocation.getArtifactRepositoryURL; also known as the download cache)
 
** artifacts/ (containing the agent's artifact repository - AgentLocation.getArtifactRepositoryURL; also known as the download cache)
 
** touchpoints/
 
** touchpoints/
*** director/ (director's rollback repository)
+
*** director/  
 +
**** content.xml (director's rollback repository)
 
*** org.eclipse.equinox.p2.touchpoint.eclipse/
 
*** org.eclipse.equinox.p2.touchpoint.eclipse/
 
**** bundlepool/
 
**** bundlepool/
Line 37: Line 38:
 
** org.eclipse.equinox.p2.touchpoints.eclipse
 
** org.eclipse.equinox.p2.touchpoints.eclipse
 
*** plugins/ (bundle pool)
 
*** plugins/ (bundle pool)
 
+
** org.eclipse.equinox.p2.director
 +
*** content.xml (director rollback repository)
 
[[Category:Equinox_p2|Data paths]]
 
[[Category:Equinox_p2|Data paths]]

Revision as of 14:53, 25 October 2007

We need to stabilize the file system layout of p2 metadata so that we can self-host on p2-provisioned Eclipse installs, and use p2 to upgrade across builds.

Current State

  • There is a p2 root directory, either supplied using the "eclipse.p2.data.area" system property, or by default it is eclipse/configuration/org.eclipse.equinox.p2.core/agentdata/.
  • Under this root, we find:
    • installRegistry.xml
    • profileRegistry.xml
    • metadata/ (the agent's metadata repository - AgentLocation.getMetadataRepositoryURL)
    • artifacts/ (containing the agent's artifact repository - AgentLocation.getArtifactRepositoryURL; also known as the download cache)
    • touchpoints/
      • director/
        • content.xml (director's rollback repository)
      • org.eclipse.equinox.p2.touchpoint.eclipse/
        • bundlepool/
          • plugins/ (the bundle pool)

Suggested approach

  • In theory, everything that reads/writes data is pluggable. We want to be able to swap in another implementation of IInstallRegistry, IProfileRegistry, IDirector, IMetadataRepositoryManager, IArtifactRepositoryManager, Engine, etc, and have the other pieces continue to work.
  • Nothing in p2 should be exempt from having to qualify their data location with their bundle id (namespace). Currently in p2, touchpoints are required to do this, but other bits of p2 do not.
  • We should continue to have a single root directory defined by a system property, or by default it will be the *same* as the configuration location (not a sub-directory of configuration location).
  • Each p2 plug-in must write into a sub-directory of that location, defined by their plugin namespace.
  • There is no distinction between touchpoint data areas, and other data areas (for example the SimpleDirector's data area)
  • We don't provide API to access the root, but we provide an API method in p2.core that dishes out the data location for a particular plugin namespace (AgentLocation.getDataLocation(String namespace))
  • For example, the eclipse touchpoint would write its data under <root>/org.eclipse.equinox.p2.touchpoint.eclipse. Since the profile registry is currently implemented by the engine plugin, its file would be at <root>/org.eclipse.equinox.p2.engine/profileRegistry.xml.
  • Remove the "bundlepool" segment from the Eclipse touchpoint's bundle pool path.

A typical p2 data location would therefore look like this (following from example above):

  • <root>
    • org.eclipse.equinox.p2.engine/
      • installRegistry.xml
      • profileRegistry.xml
    • org.eclipse.equinox.p2.core/
      • metadata/ (local metadata repository)
      • artifacts/ (local artifact repository, aka download cache)
    • org.eclipse.equinox.p2.touchpoints.eclipse
      • plugins/ (bundle pool)
    • org.eclipse.equinox.p2.director
      • content.xml (director rollback repository)

Back to the top