| Summary: | [publisher] A "better" id for the categories would be helpful | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Marco Lehmann-Mörz <mlehmannm> | ||||||
| Component: | p2 | Assignee: | P2 Inbox <equinox.p2-inbox> | ||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | aniefer, kitlo, pascal, thomas | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 3.6.1 | ||||||||
| Hardware: | All | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marco Lehmann-Mörz
The version seems to be not really the problem, but a "better" id for the categories would by helpful. I try to assemble a target platform containing some features (eclipse-rcp, emf, gef, ...) and its corresponding nl-fragments in all supported languages. So I use B3 to aggregate everything into one final repository. BTW, an additional top-level category "all languages" would by very handy instead of naming all categories from helios and galileo, because not all projects from galileo have nl-fragments for helios. p2 director accepts IUs in the form <id> [ '/' <version> ] the current category ids (file:/home/...) prevent me from using the director application to install nl-bundles, at least on windows. Babel uses the UpdateSitePublisher to convert the Babel update site to a p2 repository. The generated unit id (e.g. "file:/home/babel-working/live/output/helios/site.xml.Babel Language Packs in Arabic") is preventing users from using the director application to install nl-bundles, at least on windows. Created attachment 183790 [details]
Sample Babel site.xml
Excerpt from content.xml:
<unit id="file:/home/babel-working/live/output/helios/site.xml.Babel Language Packs in Arabic" version="1.0.0._HCY-cLVmbNF0gKBFBGHOUEXTUBD">
<properties size="3">
<property name="org.eclipse.equinox.p2.name" value="Babel Language Packs in Arabic"/>
<property name="org.eclipse.equinox.p2.description" value="Babel Language Packs in Arabic"/>
<property name="org.eclipse.equinox.p2.type.category" value="true"/>
</properties>
<provides size="1">
<provided namespace="org.eclipse.equinox.p2.iu" name="file:/home/babel-working/live/output/helios/site.xml.Babel Language Packs in Arabic" version="1.0.0._HCY-cLVmbNF0gKBFBGHOUEXTUBD"/>
</provides>
<requires size="35">
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_technology.egit_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_eclipse_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_dsdp.mtj_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_tools.cdt_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_rt.equinox_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_modeling.emft.eef_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_modeling.gmp.gmf-tooling_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_modeling.mdt.ocl_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_technology.linux-distros_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_birt_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.common_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_tools.ptp_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_dsdp.tm_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_technology.actf_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.servertools_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.jsdt_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_tools.mylyn_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_tools.mat_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_modeling.gmp.gmf-runtime_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.jeetools_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.sourceediting_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_dsdp.sequoyah_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.jsf_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_tools.gef_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_modeling.emf.validation_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.ejbtools_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_tools.ptp.photran_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_rt.rap_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_datatools_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_modeling.gmp.gmf-notation_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.webservices_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_technology.jgit_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_technology.packaging.mpc_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_webtools.dali_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
<required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.babel.nls_rt.equinox.p2_ar.feature.group" range="[3.6.0.v20101124043401,3.6.0.v20101124043401]"/>
</requires>
<touchpoint id="null" version="0.0.0"/>
</unit>
p2 team, reporter requested a "better" id for the categories in comment 1. Babel uses the UpdateSitePublisher to convert the Babel update site to a p2 repository. The unit id is generated by p2. Can p2 look into generating a "better" id? Marco, Kit, out of the content.xml shown by Kit (or another sample of yours), which part would you like to see changed. Thx (In reply to comment #7) > Marco, Kit, out of the content.xml shown by Kit (or another sample of yours), > which part would you like to see changed. Thx Hi Pascal, I think a good staring point would be id=org.eclipse.babel.nls_ar.category (from Kit's example) version=3.6.0 Are there any plans to support an uber-feature or uber-category to include all languages in one category or feature. So one could consume only one feature or category (in a b3 aggregation for example) to install all available language-bundles for a set of features and plug-ins. The p2 code (SiteXMLAction) supports specifying a version and a categoryQualifier. The IU then is named categoryQualifier + '.' + categoryName Note that in the site xml, there is a "name" and a "label". Here "name" should is the "id". So you can do something like: <category-def name="nls_ar.category" label="Babel Language Packs in Arabic"/> and then pass categoryQualifier=org.eclipse.babel categoryVersion=3.6.0 to achieve the desired result. If categoryQualifier is the empty string, then the IU id will just be categoryName. So you could also do <category-def name="org.eclipse.babel.nls_ar.category" label="Babel Language Packs in Arabic"/> categoryQualifier="" I believe this is sufficient to get a "better" id. The command line application "org.eclipse.equinox.p2.publisher.UpdateSitePublisher" supports setting these with "-categoryQualifier" and "-categoryVersion" arguments. PDE/Build allows specifying these with the following properties: "p2.category.prefix", "p2.category.version". Since comment #0 indicates you are using B3, I will move this bug there for comment on whether or not they support setting these values. Hi Marco, I followed Andrew's suggestion to change the "category-def" in Babel to the "org.eclipse.babel.nls_<locale>" pattern. The unit IDs in Babel p2 repository look better. Could you try the latest Babel p2 repositories again? http://build.eclipse.org/technology/babel/update-site/N20110628-0400/indigo/ http://build.eclipse.org/technology/babel/update-site/N20110628-0400/helios/ I downloaded both versions of content.jar and they both contain only one category (Uncategorized). There are no NL-categories. Do I miss something? (In reply to comment #10) > Hi Marco, I followed Andrew's suggestion to change the "category-def" in Babel > to the "org.eclipse.babel.nls_<locale>" pattern. The unit IDs in Babel p2 > repository look better. Could you try the latest Babel p2 repositories again? > > http://build.eclipse.org/technology/babel/update-site/N20110628-0400/indigo/ > http://build.eclipse.org/technology/babel/update-site/N20110628-0400/helios/ B3 doesn't normally deal with categories. It will simply mirror the IU's that represent them. You can model custom categories to be injected in the result or give existing categories different prefixes depending on what contribution they stem from, but I don't think that is applicable here. Now moving the bug back to p2. p2 already supports everything required here. Created attachment 199576 [details] Babel language pack category Just to recap, in http://build.eclipse.org/technology/babel/update-site/N20110713-0400/indigo the Babel language pack categories now have the ID in "org.eclipse.babel.<proj>" format and categoy versions are now in "3.7.0.vXXXX" format. |