Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Equinox/p2/CUDFResolver

< Equinox‎ | p2
Revision as of 04:41, 24 January 2010 by Leberre.cril.univ-artois.fr (Talk | contribs) (How to get it?)

p2 CUDF Resolver

What is it?

A frontend to p2 that allows p2 to resolve Linux dependencies. The input and output format is CUDF. This format has been designed by the Mancoosi European project to foster improvements in dependency resolution solvers. Supporting a different format can be done trivially, just contact us.

How to get it?

For the moment, we provide a all-in-one jar including all dependencies for easy testing.

http://eclipse.org/equinox/p2/p2CUDF/p2cudf.jar


January 24, 2010: The solver can now be stopped using SIGTERM or Ctrl-C: it will display the best solution found so far. The explanation in case of failure now appears in the output file (if -explain is used).

January 15, 2010: Initial release.

How to use it?

The resolver uses the following command line:

java -jar p2cudf.jar [flags] inputFile [outputFile]
-obj (paranoid | trendy | p2)     The objective function to be used to resolve the problem. p2 is used by default.
-timeout <number>(c|s)            The time out after which the solver will stop. e.g. 10s stops after 10 seconds, 
                                  10c stops after 10 conflicts. 
                                  Default is set to 200c for p2 and 2000c for other objective functions.
-sort                             Sorts the output.
-explain                          Provides one reason of the unability to fullfil the request
-verbose
 
inputFile          The fully path to a CUDF formatted file describing the universe and the query.
outputFile        The fully path to a CUDF formatted file describing the packages to install. If no output file is provided, the solution is displayed on STDOUT.


The following command line launches the solver for 100 seconds on the problem foo.cudf using the p2 optimization criteria.

java -Xmx512m -jar p2cudf.jar -timeout 100s -obj p2 foo.cudf output.cudf

The main advantage of using a conflict based timeout is that the results of the solver should be identical on all architectures, while the result provided by a time based timeout is likely to differ from one machine to the other.


Objective functions

paranoid: The paranoid objective function will focus on returning a solution with the least change possible from the original solution.

trendy: The trendy objective function will focus on installing the most up to date version for each package.

p2: The p2 objective function maximizes the new things being installed but keep unmodified things that were originally in the solution.


Where can I get the code?

repository: :pserver:anonymous@dev.eclipse.org:/cvsroot/rt/

module: org.eclipse.equinox/incubator/p2/demos/misc-conf-2010/


Relationship with p2 in Eclipse

This solver is designed and maintained by p2 committers. It is a simplified version of the code being shipped in Eclipse p2 because CUDF is simpler than p2 metadata, but it still uses our SAT based (SAT4J) approach like described in our publication.


Reporting bugs?

Create a bug in the p2 component in Equinox's Bugzilla.


Getting in touch with the developers?

Just send an email to the developer mailing list: p2-dev@eclipse.org.


License?

This code is made available under the terms of the EPL: http://eclipse.org/org/documents/epl-v10.php

Back to the top