Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 274673 - [publisher] Category names are not unique when exporting from the update site
Summary: [publisher] Category names are not unique when exporting from the update site
Status: RESOLVED DUPLICATE of bug 261104
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 RC1   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 274356
  Show dependency tree
 
Reported: 2009-05-01 13:36 EDT by Ian Bull CLA
Modified: 2009-05-12 14:29 EDT (History)
4 users (show)

See Also:


Attachments
If the empty string is passed as a qualiifer name, then site.location will be used (940 bytes, patch)
2009-05-01 15:40 EDT, Ian Bull CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2009-05-01 13:36:55 EDT
When we build a repository using an update site project (build all) the category names are not unique.  It looks like we pass "" for the category qualifier.  

This can be fixed in a few ways. 
1. We can use the site.location as a prefix in this case (consider "" as no qualifier) 
2. Add a version to the category files (bug 261104)
3. Do both.
Comment 1 James D. Miles CLA 2009-05-01 14:29:04 EDT
So if I have category "A" on site "SiteX" and category "A" on site "SiteY" what does the UI display? Is it displayed as two different categories or one?
Comment 2 Susan McCourt CLA 2009-05-01 14:31:40 EDT
When this bug is fixed, the content from both sites will appear in "A"
Comment 3 Ian Bull CLA 2009-05-01 15:40:19 EDT
Created attachment 134107 [details]
If the empty string is passed as a qualiifer name, then site.location will be used

This fixes the problem using method (1) above.
Comment 4 Andrew Niefer CLA 2009-05-06 17:39:09 EDT
done
Comment 5 Andrew Niefer CLA 2009-05-06 17:51:04 EDT
Sorry, I changed my mind about this.
For export, this results in ids that look something like
id='file:/C:/Dev/Platform/Workspaces/junit-workspace/pde.build/PublishFeature_Bug270882/category.xml.new_category_2'

Which isn't very good. The site location only really makes a good qualifier when its a real site instead of a file in the workspace.
Comment 6 Andrew Niefer CLA 2009-05-06 18:01:02 EDT
I've released the changes on bug 261104, so the categories now get versions.

I am not sure if anything needs to be done here. 
I like the ability to say that no qualifier should be used, particularly if the site/category xml uses proper ids.
I don't like having build time paths as the qualifier.

Ian, do you have any other ideas about qualifiers in export, or are we happying with versions (ie solution (2))
Comment 7 Ian Bull CLA 2009-05-06 19:03:34 EDT
(In reply to comment #6)
> I've released the changes on bug 261104, so the categories now get versions.
> 
> I am not sure if anything needs to be done here. 
> I like the ability to say that no qualifier should be used, particularly if the
> site/category xml uses proper ids.
> I don't like having build time paths as the qualifier.
> 
> Ian, do you have any other ideas about qualifiers in export, or are we happying
> with versions (ie solution (2))
> 

I'm happy with the versions. I didn't really like the file name qualifier either.  Have you reverted this patch? If so, I'm happy to call this bug fixed (as won't fix).
Comment 8 Andrew Niefer CLA 2009-05-06 19:11:07 EDT
Yes, I reverted the changes.  Marking as won't fix.
Comment 9 Susan McCourt CLA 2009-05-06 20:19:53 EDT
wait a minute...this means category merging won't work.  
See bug 274356.
Or are you claiming that versioning will solve the problem?  I haven't been following the versioning discussion, are the versions timestamped so we know they are unique across different exports?
Comment 10 Susan McCourt CLA 2009-05-06 20:22:35 EDT
(In reply to comment #9)
> wait a minute...this means category merging won't work.  
> See bug 274356.
> Or are you claiming that versioning will solve the problem?  I haven't been
> following the versioning discussion, are the versions timestamped so we know
> they are unique across different exports?
> 

Never mind, you very nicely explained this back in my bug!
I'll verify that one against the next build...
Comment 11 Ian Bull CLA 2009-05-06 20:23:44 EDT
(In reply to comment #9)
> wait a minute...this means category merging won't work.  
> See bug 274356.
> Or are you claiming that versioning will solve the problem?  I haven't been
> following the versioning discussion, are the versions timestamped so we know
> they are unique across different exports?
> 

Categories are now being versioned with 0.0.0.date. I'm pretty sure we go down to the second with date, so unless two exports happen at the exact same time, with the same ID, this should fix the problem.  Do you think we have to worry about the date?  
Comment 12 James D. Miles CLA 2009-05-12 12:25:00 EDT
I think that it won't matter for the wizard that I am using. I will test this soon.
Comment 13 James D. Miles CLA 2009-05-12 12:28:05 EDT
Can you dup this to the bug that fixed the problem with versions? 
Comment 14 James D. Miles CLA 2009-05-12 14:00:00 EDT
Verified fixed on 0511-2000 sdk.
Comment 15 Ian Bull CLA 2009-05-12 14:29:51 EDT
Marking a dup of bug 261104.

*** This bug has been marked as a duplicate of bug 261104 ***