Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] ProvisioningContext

> In several parts of the p2 APIs there is use of a ProvisioningContext
> (e.g. in IDirector, etc).  In looking at a fair amount of actual and p2
> test code in many cases this ProvisioningContext is set to null in the
> usage of the API.     The javadocs frequently say "The provisioning
> context used for finding resources".
>
> What is the intended usage/purpose of ProvisioningContext?


ProvisioningContext is used to provide any extra information and/or resource scoping for a provisioning operation.
In the director we use this to restrict the IUs available to the planner by providing a list of metadata repos and in some cases additional IUs. Likewise, the engine uses the ProvisioningContext to restrict the set of artifact repositories we will consult when executing the collect phase.

For an example of where we're using a ProvisioningContext you might look at the reconciler where we do some deep restriction to avoid consulting remote repos on startup.

The API is still in the works but as fair as I know you can always pass a null ProvisioningContext in and get the default (search all repos) behavior.
-Simon

> Is it
> required under any circumstances?  If so, which?
>
> Thanks for info,
>
> Scott
>
>
> _______________________________________________
> p2-dev mailing list
> p2-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/p2-dev


Back to the top