Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340971 - addRepository touchpoint action doesn't add the repository URL
Summary: addRepository touchpoint action doesn't add the repository URL
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: Juno M1   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-25 11:11 EDT by Samuel Wu CLA
Modified: 2011-09-09 16:11 EDT (History)
2 users (show)

See Also:


Attachments
patch (work in progress) (5.16 KB, patch)
2011-07-26 16:44 EDT, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Wu CLA 2011-03-25 11:11:55 EDT
Build Identifier: Eclipse SDK 3.6.2

The update site URL was not added when calling org.eclipse.equinox.p2.director to install a feature which uses addRepository touchpoint action to add an repository site URL.

Reproducible: Always

Steps to Reproduce:
1. Create a feature project and add a p2.inf to it
2. Call the addRepository touchpoint action to add a URL like the following
instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//tpftoolkit/temp/test_update,name:Test site);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//tpftoolkit/temp/test_update/,name:Test site);
3. Create an update site project, add the feature and build it
4. Upload the repository to the web server on tpftoolkit/temp/test_update/
It's important to put it at the same spot as the repository url defined in the p2.inf file
5. Run the following command to install the feature
eclipse.exe -application org.eclipse.equinox.p2.director -repository http://tpftoolkit/temp/test_update1/ -installIU com.ent.feature.group
6. The feature is installed but the URL is not added to the repository list
7. If the repository is moved to another spot, one whose url is different from the one defined in the p2.inf file, the URL will be added when the feature is installed.
Comment 1 DJ Houghton CLA 2011-06-29 15:35:27 EDT
This is what is happening:
- the repository isn't in the list to begin with
- the director application adds it and marks it for removal
- we install the feature
- we add the repository to the list (already there)
- the director application removes the repository

There is a count object but I'll have to investigate further to see how we use that.
Comment 2 John Arthorne CLA 2011-06-29 17:17:22 EDT
Ah, this is the code that prevents the director application from polluting the install with repos required by that director invocation. But in this case since the touchpoint is adding it, the director should not remove it.
Comment 3 DJ Houghton CLA 2011-07-26 16:44:32 EDT
Created attachment 200394 [details]
patch (work in progress)
Comment 5 Samuel Wu CLA 2011-07-29 11:36:07 EDT
Thank you, DJ, for fixing the problem. Wonder whether I can pick up the new driver. I found a 3.8 driver built on 07/27 but the status for windows was marked with a red cross.
http://download.eclipse.org/eclipse/downloads/drops/I20110727-2000/index.php
Comment 6 Samuel Wu CLA 2011-07-29 13:32:32 EDT
I download the driver and it works fine. Thank you, DJ.
Comment 7 Samuel Wu CLA 2011-09-09 16:11:48 EDT
Hi DJ,
We are still on Eclipse 3.6. Wonder whether this fix can be ported back to 3.6. Thanks.