Community
Participate
Working Groups
Build ID: Build id: I20080513-0817 Steps To Reproduce: 1. Download eclipse SDK and use it to create a feature com.ibm.test.parent 1.0.0 2. Build an update site using feature com.ibm.test.parent 1.0.0 3. Update the version number of feature com.ibm.test.parent to 1.0.1 and rebuild the update site 4. Update the version number of feature com.ibm.test.parent to 1.0.2 and rebuild the update site 5. Move the update site to a http server (I'm going to attach the update site later) 6. Start SDK and add this site to the available site The name of the site looks wired. Instead of showing the URL to the http server, it shows the directory on the local drive where the update site was built in. Since the URL may not mean anything to the end user, it's better to follow the example of the update manager. It picks up the site name from the site url in the feature.xml or let the user input it when a new site is added. More information:
The file is too big to be attached here. You can get it from the following URL. It will be removed on 05/22/2008 ftp://ftp.emea.ibm.com/fromibm/pmr/83938,49R,000/update.zip
I think the update site editor should have a place for the user to enter the name. Currently you can open the content.xml and artifacts.xml files in the update site project and edit the name manually, but this is not intuitive. See the "name" attribute on the repository element: <repository name='file:/C:/1target/workspace/sitetest - metadata' If you change this to <repository name='Here is my site name' Then you will see this site name in the UI.
Also if you are exporting an old style site and then generating metadata using http://wiki.eclipse.org/Equinox_p2_Metadata_Generator, then you get the possibility to specify a name for your repository.
Since our corporate customers are building their internal update site to provide the corporate wide support, it's not a choice to manipulate the xml files manually. They are currently using update site project to do the internal deployment. The current update site name in UM is defined in the feature.xml, which can be input through GUI. P2 has to provide something similar. We can take away an existing function from the product without a good reason.
PDE has never supported setting a name of an update site, this was something users did when they manually added the site or did it some other way. Pascal, can p2 do some stupid heuristic to maybe fill in a name somehow? I'm not sure what PDE can do here... Maybe in the p2 ui, when adding a site, Susan can offer the ability to name a repo similar to what is done with the old UM?
>Maybe in the p2 ui, when adding a site, Susan can offer the ability to name a >repo similar to what is done with the old UM? The problem is that the name property on the repo is not writable by the UI. Once created, most repos are not writable by end users. During our original discussion on this, we said that producers/tooling would take care of it, and then we might consider letting the user override it. (See bug 194224). To fix at this late date, the UI would have to capture a name and store it separately, associating it with repos in the UI code. It's a bit late to be doing that. If PDE is creating repos, it would make sense to capture a name there. That is where producers can name the repo. A further enhancement would be to let users rename.
The only option I can see it PDE writing out the site URL... ie., <description url="www.myupdates.com/site"> as the p2 repo name? Would this work for people? If so, how do I set the name of a repo programmatically?
I'd prefer a readable name and it's better to be a translatable string. I don't expect the end users to remember which URL is for which feature/component.
*** Bug 239424 has been marked as a duplicate of this bug. ***
>> PDE has never supported setting a name of an update site, this was something >> users did when they manually added the site or did it some other way. I'm probably missing something obvious here, but ... if the name was settable when a repo was manually added before, why not just make it settable when a repo is manually added one now? There's no need to add special repo-editing UI functionality that Eclipse has never had; just put the stupid textbox back on the Add Site dialog and everyone will be happy.
(In reply to comment #10) Jeremy, feel free to file a bug against p2 telling them todo that ;) From the PDE side of things, we'll work on providing some type of solution in 3.5
This bug is "how does the site producer name a site," hence a PDE issue. >Jeremy, feel free to file a bug against p2 telling them todo that ;) The "how does a user name a site" bug is bug #194224
Thanks for the clarification, and sorry to bother y'all; I'll go bother those p2 fools now :-)
Created attachment 108881 [details] Patch for PDE UI Adds the UI part to specify a site name as part of the description. Plays nicely with site.xml files with or without a name specified. Tried using the a 3.2 build to make sure the xml was still valid, worked fine. Only problem is that even if I set all the name properties (root, metadata and artifact), none of them show up in the content.xml. I will have to cc Andrew as it's a problem with PDE Build (or how I'm using it).
Created attachment 108882 [details] mylyn/context/zip
Hey Andrew, can you explain to me what properties need to be set when exporting/building to set the repository name? See patch and comment for details.
Andrew, I'd like to see this in 3.5M1, any ideas what's up here?
The properties IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO_NAME and IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO_NAME should work. Note that this will not change the name of an existing repo, only set it for new repos. Note that your attached patch here does not compile for me so I can't try this out.
Got it working, fixed in HEAD just in time for M1. If the name doesn't show up properly when adding the repo to p2's list, just right click and hit refresh and the name should update.
*** Bug 266321 has been marked as a duplicate of this bug. ***