Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337381 - category/site publisher embeds file location
Summary: category/site publisher embeds file location
Status: CLOSED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-16 18:38 EST by Jeff McAffer CLA
Modified: 2011-02-17 22:38 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2011-02-16 18:38:20 EST
the category/site publishing action creates categories whose id is prefixed with the location of the category.xml file used to define the categories.  This likely makes sense when publishing the categories that come from random, possibly overlapping update sites but when creating managed product repos it is not great that the category id expose internal build details.

The culprit is in SiteXMLAction.buildCategoryId().  There the supplied category id is prefixed with the update site location.  I'm thinking that an option on the siteXMLAction to not prefix would address the issue.  Leave the default to the current behaviour but allow people to turn it off.

Any thoughts/comments?  If not I'll go ahead and do the change.
Comment 1 Pascal Rapicault CLA 2011-02-16 23:09:17 EST
I suppose this was done to guarantee the uniqueness of the categories to avoid unnecessary merging. 
Beside the actual aesthetic problems in the generated metadata, is there an issue at runtime where the two categories generated from two different machines would not get merged?

I think it makes sense to go down the path of not prefixing, but we should make sure that the ID is actually specific enough.

CC Ian as he may remember more specificities.
Comment 2 Andrew Niefer CLA 2011-02-17 11:25:46 EST
There is an existing "categoryQualifier" that can be set which is then used as the prefix instead of the location.
Comment 3 Jeff McAffer CLA 2011-02-17 22:38:56 EST
Very true Andrew.  Thanks.  I did not look close enough at the use of qualifier and assumed it had to do with the version number.  With that in mind, people can publish using a qualifier and avoid exposing internal gorp so I'll close this as invalid.