apt-cudf translates back and forth among a CUDF-based dependency solver and the protocol used by APT to talk with external dependency solvers. apt-cudf therefore allows one to use any CUDF solver as an external solver for APT.
apt-cudf relies on its
argv name to find the CUDF solver to invoke. In common setups, you should have a CUDF solver specification file under /usr/share/cudf/solvers/ for each installed CUDF solver. To use one such solver with APT, you should create a symbolic link pointing to /usr/bin/apt-cudf under /usr/lib/apt/solvers/ and call it with the name of the CUDF solver you want to use.
Print debugging information during operation. Can be repeated.
Show usage information and exit.
Show program's version and exit.
Dump the cudf universe and solution
Dump the cudf universe and solution and exit. This is useful to generate a cudf universe from a edsp file
Use a configuration file. Default in /etc/apt-cudf.conf
Specify the external solver to use.
Specify the optimization criteria in extended MISC 2012 syntax. This value will be converted into the optimization criteria language understood by the respective solver.
As an extension to the MISC 2012 syntax, a variation of the count() measurement is supported by apt-cudf. The extension allows to minimize or maximize the number of packages in a set that have an EDSP field matching a regular expression. Two formats exist. The first searches for a plain string within the EDSP field value:
While the second one understands the regular expression syntax of the OCaml Re_pcre module:
The regex or plain string are delimitered by any character (the slash was chosen in both above examples) but that character must not be part of the regex or plain string itself (there is no escaping mechanism).
This option cannot be used together with the --criteria-plain option.
This optimization criteria is passed directly to the solver without any prior parsing.
This option cannot be used together with the --criteria option.
Print a human-readable summary of the solution.
Speficy the native architecture to be used in the edsp -> cudf translation. By default apt-cudf uses apt-config to deduce the native architecture. This option is useful if the edsp was generated on a machine with a different architecture.
A comma-separated list of foreign architectures to be used in the edsp -> cudf translation
Find a solution for installing the package ghc which minimizes the packages from experimental:
apt-get --simulate install --solver dump -o APT::Solver::Strict-Pinning=false ghc apt-cudf -v --solver=aspcud -c "-count(solution,APT-Release:=/a=experimental/),-removed,-changed,-new" /tmp/dump.edsp
Usually apt-cudf is not called directly by the user but indirectly by apt-get. So the above would become:
apt-get --simulate install --solver aspcud -o APT::Solver::Strict-Pinning=false -o APT::Solver::aspcud::Preferences="-count(solution,APT-Release:=/a=experimental/),-removed,-changed,-new" ghc/experimental
Copyright: (C) 2011 Pietro Abate <email@example.com> Copyright: (C) 2011 Stefano Zacchiroli <firstname.lastname@example.org>
License: GNU Lesser General Public License (GPL), version 3 or above