Skip to main content

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

The resolution done when Mirroring and Installing is not the same because when you are mirroring you don't necessarily have access to the complete context in which your IUs will be deployed. Therefore performing an "install" like resolution could result in taking out of the repo some of the IUs that could otherwise be used to resolve in another context.

You are looking at the wrong code! The org.eclipse.equinox.p2.tools bundle is defunct. As mentioned previously the code doing the transitive closure during mirroring is the class called PermissiveSlicer in the org.eclipse.equinox.p2.director bundle.

Inactive hide details for Alessandro Mottadelli ---05/09/2009 12:59:07 AM---Hi,Alessandro Mottadelli ---05/09/2009 12:59:07 AM---Hi,


From:

Alessandro Mottadelli <amottadelli@xxxxxxxx>

To:

P2 developer discussions <p2-dev@xxxxxxxxxxx>

Date:

05/09/2009 12:59 AM

Subject:

Re: [p2-dev] P2: wich IUs to install?




Hi,
I have given a look to M7 to see how this thing was finally implemented, but I found that it is still open:


protected IInstallableUnit[] addTransitiveIUs(IMetadataRepository source, IInstallableUnit[] roots) {
// TODO Here we should create a profile from the source repo and discover all the
// IUs that are needed to support the given roots. For now just assume that the
// given roots are enough.
return roots;
}


In fact, I wonder why "Mirroring" and "Installing" aren't just the same thing.

If I create a "fake" profile for the
target repository and then create a ProfileChange request with the UIs that I want to mirror, I get back from the planner ther list of the InstallOperations to perform (that is the list of the prerequisites UIs).
If I then execute the plan, it looks like I have what I need ("promoting" an IU with its prerequisites from a test repository to a production one).

Am I missing something?

Best regards,
Alessandro Mottadelli




Ian Bull ha scritto:
      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.

      cheers,
      ian


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

        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?

        Thanks!

        Alessandro Mottadelli
        _______________________________________________
        p2-dev mailing list

        p2-dev@xxxxxxxxxxx
        https://dev.eclipse.org/mailman/listinfo/p2-dev



      --
      R. Ian Bull | EclipseSource Victoria | +1 250 477 7484

      http://eclipsesource.com | http://twitter.com/eclipsesource



      _______________________________________________
      p2-dev mailing list
      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev
       
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


GIF image

GIF image


Back to the top