Bug 131635 - Default update policy is always USER-EXCLUDE
Summary: Default update policy is always USER-EXCLUDE
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Branko Tripkovic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-13 20:54 EST by James D. Miles CLA
Modified: 2006-05-03 17:48 EDT (History)
5 users (show)

See Also:


Attachments
Patch to fix default policy when using MANAGED-ONLY (5.58 KB, patch)
2006-03-13 20:59 EST, James D. Miles CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James D. Miles CLA 2006-03-13 20:54:57 EST
Overview: When new sites are created only the policy USER-EXCLUDE is used. There should be a choice.

Steps to Reproduce:
1. Start Eclipse 3.2M5 sdk.
2. Shutdown Eclipse
3. Change the platform.xml from
<site enabled="true" policy="USER-EXCLUDE" updateable="true" url="platform:/base/">
to 
<site enabled="true" policy="MANAGED-ONLY" updateable="true" url="platform:/base/">
4. Restart eclipse
5. You will see some jdt errors if you have the console open. These are not related to this bug.
6. Help->Software Updates->Find and install
7. Search for new features to install
8. Add a new local site to sites to search. I used the xyz sample site created by cheatsheet.
9. Finish
10. Select xyz feature to install
11.On the install page of wizard select "Change Location" button.
12. On the New Update Site Dialog choose "Add Location"
13. Browse to a new site to be added.
14. OK. Finish install.
15. After eclipse has restarted, check the platform.xml the new site will be using USER-EXCLUDE
<site enabled="true" policy="USER-EXCLUDE" updateable="true" url="file:../../../ctemp/eclipse/">
<feature id="com.example.xyz" url="features/com.example.xyz_2.0.0/" version="2.0.0">
</feature>
</site>

EXPECTED RESULTS: Since I am using the policy MANAGED-ONLY I would expect that any new sites created would be using this policy.

I have provided a patch with this bug. Since for MANAGED-ONLY we are always providing a platform.xml the change in policy does not need to happen until after the platform.xml is parsed. However this patch makes an assumption. The DTD allows each site to specify its own policy. My assumption is that if we are using MANAGED-ONLY we will want all sites to be that policy. So to set the default policy only the first site is checked for its policy. If the policy is MANAGED-ONLY for this site the default policy is set to MANAGED-ONLY.

If this is not satisfactory I can provide a different patch that reads the default policy from a preference.
Comment 1 James D. Miles CLA 2006-03-13 20:59:32 EST
Created attachment 36191 [details]
Patch to fix default policy when using MANAGED-ONLY
Comment 2 Steven Wasleski CLA 2006-05-01 13:37:45 EDT
What is the outlook for getting this bug fixed in 3.2?
Comment 3 Dejan Glozic CLA 2006-05-01 13:43:41 EDT
We are trying to minimise the number of defects we fix for RC3. What makes this defect a must-fix for 3.2? 
Comment 4 Dejan Glozic CLA 2006-05-01 16:59:33 EDT
RC3 candidate.
Comment 5 Branko Tripkovic CLA 2006-05-03 12:28:31 EDT
Released.
Comment 6 Dejan Glozic CLA 2006-05-03 15:01:20 EDT
Need formal votes.

Dejan adds +1.
Comment 7 Dejan Glozic CLA 2006-05-03 15:02:00 EDT
Jeff, need additional +1 before releasing.
Comment 8 Dejan Glozic CLA 2006-05-03 16:38:57 EDT
Wassim, you can help Jeff to unblock this backlog. This bug is checked and ready to go.
Comment 9 Wassim Melhem CLA 2006-05-03 16:42:57 EDT
+1 for RC3
Comment 10 Branko Tripkovic CLA 2006-05-03 17:48:52 EDT
fixed