Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 224999

Summary: [ui] support importing old style update site bookmarks into p2 update manager
Product: [Eclipse Project] Equinox Reporter: Eugene Kuleshov <ekuleshov>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, pascal, susan
Version: unspecified   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 226759    
Bug Blocks:    

Description Eugene Kuleshov CLA 2008-03-31 17:39:35 EDT
It would be really helpful to be able to import old style update site bookmarks into p2 update manager. I have few dozen update sites accumulated un my bookmarks and entering them all manually is time consuming.
Comment 1 Pascal Rapicault CLA 2008-03-31 20:49:58 EDT
Susan, what about d&d for that?
Comment 2 Eugene Kuleshov CLA 2008-03-31 21:24:18 EDT
Good old Import/Export would be really sufficient.
Comment 3 Susan McCourt CLA 2008-03-31 22:02:48 EDT
We should start with import/export and anything cooler than that can be considered once that is working.  

One way to achieve bookmarks without changing a thing would be to export using a repo that had associate sites, and p2 would pick this up simply as a repo.  

However that would require exporting with new code, and I suspect the right answer to use the format from the old export....
Comment 4 Eugene Kuleshov CLA 2008-03-31 22:48:26 EDT
Susan, please note that old update manager bookmarks != update site.

Here is how exported bookmarks look like 

<?xml version="1.0" encoding="UTF-8"?>
<bookmarks>
   <site name="Graphical Editing Framework (GEF) Update Site" url="http://download.eclipse.org/tools/gef/update-site/releases/site.xml" web="false" selected="false" local="false"/>
   <site name="Andrei Loskutov plugins site" url="http://andrei.gmxhome.de/eclipse/" web="false" selected="false" local="false"/>
   <site name="Mylyn Extras" url="http://download.eclipse.org/tools/mylyn/update/extras" web="false" selected="false" local="false"/>
   <site name="Mylyn" url="http://download.eclipse.org/tools/mylyn/update/e3.4" web="false" selected="false" local="false"/>
</bookmarks>
Comment 5 Susan McCourt CLA 2008-04-01 10:09:12 EDT
>>However that would require exporting with new code, and I suspect the right
>>answer to use the format from the old export....

>Susan, please note that old update manager bookmarks != update site.

Yes, I was referring to the old export format.  There is potentially a "native" way we could support bookmarks with p2 repo descriptions, and my comment meant that we would need to support the old format (as described by you).


Comment 6 Susan McCourt CLA 2008-04-21 16:28:12 EDT
Working on this now.

For 3.4, we will read the bookmark file, but we will only be paying attention to the "url" and "selected" properties.  The "url" is the location of the repo that is being read.  If "selected" is true, the repo will be added to the repo manager and if "selected" is false, the repo will be added but disabled (or added as a discovered site...whatever ends up happening per bug #226759).

Honoring the "name" property will only happen when we implement bug #194224.  I've added information in that bug about import/export.
Comment 7 Susan McCourt CLA 2008-04-22 20:21:28 EDT
fixed in HEAD >20080422.
You can now import/export sites from the "Manage Sites..." dialog, and read bookmarks files exported from Update Manager.

It so happens (but no guarantee it will stay this way) that you can also read the p2 exported files back into an Update Manager install.  p2 exports the repo name, selected status, and URL to the file.  
Comment 8 Susan McCourt CLA 2008-04-22 20:28:45 EDT
marking fixed
Comment 9 John Arthorne CLA 2008-04-23 10:42:16 EDT
Susan, I assume the export format assumes colocated repositories? I.e., you can't export just a metadata repository or artfiact repository that is not colocated? I don't have a use case for this, I just want to understand current limitations.
Comment 10 Susan McCourt CLA 2008-04-23 11:24:47 EDT
>Susan, I assume the export format assumes colocated repositories? I.e., you
>can't export just a metadata repository or artfiact repository that is not
>colocated? 

Yes, the export is implemented in the SDK UI, which assumes colocated repositories.  What it actually does is export the metadata repository locations and attributes.  On import, it adds a metadata and artifact repository for each update site in the bookmarks file.