[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] P2: wich IUs to install?

You could like use the slicer for this.

Something like this:
PermissiveSlicer slicer = new PermissiveSlicer(getCompositeMetadataRepository(), slicingOptions.getFilter(), slicingOptions.includeOptionalDependencies(), slicingOptions.isEverythingGreedy(), slicingOptions.forceFilterTo(), slicingOptions.considerStrictDependencyOnly());

return slicer.slice((IInstallableUnit[]) sourceIUs.toArray(new IInstallableUnit[sourceIUs.size()]), monitor);

In this case you are creating a permissive slicer and then querying it for the "slice" given a set of root (or source in this case) IUs.

Checkout the mirror application in repository tools (it is very new), it does this.


On Fri, Mar 6, 2009 at 1:11 PM, Alessandro Mottadelli <amottadelli@xxxxxxxx> wrote:

Is there a way to discover, given a set of IUs wich other IUs I have to add to make the set installable?
In other words: how can I calculate the transitive closure of the dependency tree of the given IUs?

Alessandro Mottadelli
p2-dev mailing list

R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource