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/Proposals/Categories API"

< Equinox‎ | p2
(Requirements on a Solution)
(What are the problems)
Line 3: Line 3:
 
After having used p2's provisional API for building p2 related tools, we have found several issues regarding the category management in 3.5. This page is an attempt to describe the issue, propose requirements on a solution, and then a suggested implementation.
 
After having used p2's provisional API for building p2 related tools, we have found several issues regarding the category management in 3.5. This page is an attempt to describe the issue, propose requirements on a solution, and then a suggested implementation.
 
=What are the problems=
 
=What are the problems=
 +
====Categories are versioned====
 +
Versioning of categories is a complication since the categorization escapes the original repository (repo A) where it was declared. When a second repository (repo B) mirrors/aggregates the content, it adopts any categorization as its view of the categorization of its content (unless it always rewrites them with new IDs - i.e. block them from being mirrored). When a new version of a categorization is added in the original repository, and repositories are aggregated A + B to repo C, what is the categorization in C?
 +
 +
The effect is also noticeable in the UI - view repositories one by one - then view a combination (all) repositories. Things found in some categories when viewing a single repository is not shown when viewing all.
 +
 +
The fundamental issue is that versioning of categorization is an odd concept, there is no way for a user to select a particular version of categorization, and even if there was, it would just be very confusing. The categorisation is simply "this repositories categorization of its content" - it is always current - it is what it is.
 +
 
==== When older update sites are transformed to p2, a new category IU is created on each visit. Each newly created IU has a unique version based on a timestamp.====
 
==== When older update sites are transformed to p2, a new category IU is created on each visit. Each newly created IU has a unique version based on a timestamp.====
 
This leads to:
 
This leads to:

Revision as of 07:11, 22 September 2009

W.I.P

After having used p2's provisional API for building p2 related tools, we have found several issues regarding the category management in 3.5. This page is an attempt to describe the issue, propose requirements on a solution, and then a suggested implementation.

What are the problems

Categories are versioned

Versioning of categories is a complication since the categorization escapes the original repository (repo A) where it was declared. When a second repository (repo B) mirrors/aggregates the content, it adopts any categorization as its view of the categorization of its content (unless it always rewrites them with new IDs - i.e. block them from being mirrored). When a new version of a categorization is added in the original repository, and repositories are aggregated A + B to repo C, what is the categorization in C?

The effect is also noticeable in the UI - view repositories one by one - then view a combination (all) repositories. Things found in some categories when viewing a single repository is not shown when viewing all.

The fundamental issue is that versioning of categorization is an odd concept, there is no way for a user to select a particular version of categorization, and even if there was, it would just be very confusing. The categorisation is simply "this repositories categorization of its content" - it is always current - it is what it is.

When older update sites are transformed to p2, a new category IU is created on each visit. Each newly created IU has a unique version based on a timestamp.

This leads to:

  • In order to understand if categorization has changed, the current categorization has to be compared.
  • Since it is not possible to know if the category is originally from a old update site, comparisons are always needed

A Category is an Installable Unit, but is not installed

This leads to:

  • Exceptional logic whenever a category is found in a result.
  • All usage requires the exceptional handling, but the only use case where categories have a role is when presenting a categorized view of what to install to the user.

Missing Features

The categorization in 3.5 only solves the need to present things to install in a human friendly way.

  • All users of a repository are presented with the same view irrespective of if they are developers or users of a published software.
  • As a consequence, it is not possible to organize "technical" things for technical people
  • There is no structure to categories (i.e. no subcategories) - which in very large repositories becomes a problem

Requirements on a Solution

  • it is unlikely that it is possible to force all older update site owners to change to p2, or have them name/version categories.
  • Blocking older update sites in p2 is not a solution.
  • It should be possible to modify the categorization of IUs in a repository without having to modify the IUs.
  • Categorisation should be mirrored

Proposed Solution

Back to the top