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

Equinox p2 data paths

Revision as of 14:49, 25 October 2007 by John arthorne.ca.ibm.com (Talk | contribs) (Suggested approach)

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:
    • install registry and profile registry
    • metadata/ subdirectory, containing the agent's metadata repository (AgentLocation.getMetadataRepositoryURL)
    • artifacts/ subdirectory, containing the agent's artifact repository (AgentLocation.getArtifactRepositoryURL). Also known as the download cache.
    • touchpoints/ subdirectory, containing:
      • director/ subdirectory, containing director's rollback repository
      • org.eclipse.equinox.p2.touchpoint.eclipse subdirectory
        • bundlepool/ subdirectory
          • plugins/ subdirectory containing 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)

Back to the top