Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 267452 - Change usage of p2 ProvisioningUtil.performProvisioningPlan(...)
Summary: Change usage of p2 ProvisioningUtil.performProvisioningPlan(...)
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-06 17:17 EST by Susan McCourt CLA
Modified: 2009-03-10 18:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2009-03-06 17:17:04 EST
I am in the process of deprecating this method as part of trying to better support disconnected users:

public static IStatus performProvisioningPlan(ProvisioningPlan plan, PhaseSet phaseSet, IProfile profile, IProgressMonitor monitor) throws ProvisionException

This method was building a default provisioning context, which basically means "contact the whole world when performing this plan."  The new method makes the caller pass in a provisioning context.

If PDE really wants to contact the whole world, just use
  new ProvisioningContext() as the argument.

If you are doing something that only requires contacting certain repos, you can use
  new ProvisioningContext(new URI [] {repo1URI, repo2URI})

This is especially important when you know your information is local, it is best to build a URI array with only the repos in hand.
Comment 1 Curtis Windatt CLA 2009-03-06 17:27:52 EST
I'm guessing that this will be something we want to do for M6.
Comment 2 Susan McCourt CLA 2009-03-06 18:34:15 EST
(In reply to comment #1)
> I'm guessing that this will be something we want to do for M6.
> 
Probably.  

As far as when to contact the world goes...
You typically want a scoped install since you know where you are creating stuff like patches or anything else you might be installing.

If you are doing any uninstall/update/revert, you probably want to contact the world, since you might need to replace bundles that have been GC'ed and need to be found in their original repos.

For targets...if you are keeping track of the repos used to define a target, you could scope all operations to the repos used originally.  But if you are just keeping track of IU's (like p2 does), then we don't have a link back to the originating repo and you'll want to keep contacting the world.

Let me know if you have specific questions.
Comment 3 Curtis Windatt CLA 2009-03-10 18:18:59 EDT
Fixed in HEAD.  For now we are going to use a global context.