APT-CUDF(1)

πŸ’… APT-CUDF(1) β€” the DOSE Tools era, bestie

okay so real talk, bestie: this is apt-cudf, and it's lowkey the glow-up your package manager didn't know it needed. It lives in the DOSE Tools family (that's the APT-CUDF(1) bit at the top of the page, iconic) and it is literally the translator between APT and CUDF solvers. let's get into it πŸ’–


✨ NAME ✨

apt-cudf β€” CUDF solver integration for APT πŸ¦‹


✨ SYNOPSIS ✨

solvername

yeah, that's it. no cap. the whole synopsis is the name you called it. you'll see why in a sec πŸ‘€


✨ DESCRIPTION ✨

so apt-cudf translates back and forth among a CUDF-based dependency solver and the protocol used by APT to talk with external dependency solvers. fr fr, it's a whole bilingual era for package resolution. which means apt-cudf therefore allows one to use any CUDF solver as an external solver for APT. every single one. no gatekeeping πŸ’…

now here's the main character twist ✨ β€” apt-cudf relies on its "argv[0]" name to find the CUDF solver to invoke. like, it looks at what you named it and that's how it knows who to be. so dramatic of it, honestly.

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. it's giving ✨symlink manifestation✨ β€” you name the link after the solver, and boom, that's your solver.


✨ OPTIONS ✨

  • -v, --verbose β€” Print debugging information during operation. Can be repeated. (yes bestie, stack them up, more -v = more yapping πŸ—£οΈ)
  • -h, --help β€” Show usage information and exit. the classic escape hatch 🫢
  • --version β€” Show program's version and exit.
  • --dump β€” Dump the cudf universe and solution. showing us everything, no shame, we love a transparent queen πŸ‘‘
  • --noop β€” Dump the cudf universe and solution and exit. This is useful to generate a cudf universe from a edsp file. just vibing and leaving, honestly slay πŸŽ€
  • --conf β€” Use a configuration file. Default in /etc/apt-cudf.conf
  • -s <solver>, --solver <solver> β€” Specify the external solver to use. pick your fighter πŸ’…
  • -c <criteria>, --criteria <criteria> β€” Specify the optimization criteria in extended MISC 2012 syntax. This value will be converted into the optimization criteria language understood by the respective solver. it's a whole translation arc ✨

As an extension to the MISC 2012 syntax, a variation of the count() measurement is supported by apt-cudf. The extension allows one 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:

count(selector,field:=/plain/)

While the second one understands the regular expression syntax of the OCaml Re_pcre module:

count(selector,field:~/regex/)

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). so pick a delimiter that isn't already in your string, that's the rule, no exceptions 😭

⚠️ This option cannot be used together with the --criteria-plain option. pick a lane bestie!!
  • --criteria-plain <criteria> β€” This optimization criteria is passed directly to the solver without any prior parsing. raw. unfiltered. no middleman πŸ“
⚠️ This option cannot be used together with the --criteria option. again, one or the other, not both πŸ’€
  • -e, --explain β€” Print a human-readable summary of the solution. finally, someone explains what just happened to me πŸ™ˆ
  • --native-arch β€” Specify 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. glow-up for cross-machine chaos 🌈
  • --foreign-archs β€” A comma-separated list of foreign architectures to be used in the edsp -> cudf translation

✨ EXAMPLES ✨

okay demo time, this is the fun part πŸ’–

Find a solution for installing the package ghc which minimizes the packages from experimental:

APT_EDSP_DUMP_FILENAME=/tmp/dump.edsp 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

see how the second one just lets apt-get do the summoning? yeah. apt-cudf stays behind the scenes, main character energy but off-camera 🎬


✨ SEE ALSO ✨

apt-get(8), update-cudf-solvers(8), README.cudf-solvers <file:///usr/share/doc/apt-cudf/README.cudf-solvers>, README.Debian <file:///usr/share/doc/apt-cudf/README.Debian> πŸ¦‹


✨ AUTHOR ✨

Copyright: (C) 2011 Pietro Abate <pietro.abate@pps.jussieu.fr> Copyright: (C) 2011 Stefano Zacchiroli <zack@debian.org>

License: GNU Lesser General Public License (GPL), version 3 or above


aaaand that's the page bestie, no notes πŸ’… this iconic little number dropped on 2026-07-06, straight from the DOSE Tools era, APT-CUDF(1), and it ate. periodt. πŸŒΈπŸ‘‘βœ¨

πŸ“¦ where this page comes from