module

Krikri::PluginHelpers::DpkgDivertCommand

DpkgDivertCommand - builds the dpkg-divert command lines community.general.dpkg_divert runs, mirroring the MAINCOMMAND construction in the real module's main(). Pure string plumbing so the exact argv shapes are unit-testable without a dpkg database (or a Debian host at all); the plugin itself executes them.

Class methods

listpackage_command(path : String) : String
Source
main_command(options : Options, path : String) : String

The one dpkg-divert invocation that adds/updates/removes the diversion. The real module probes --version for --no-rename support (dpkg >= 1.19.1, 2019) - treated as always-supported here, same reasoning as lvol's --yes shortcut: --no-rename is always passed explicitly unless --rename was asked for.

Source
remove_command(path : String) : String
Source
truename_command(path : String) : String
Source
version_command
Source
with_test(command : String) : String

Inserts --test where the real module puts it (right after the binary, before the action flags) - used both for check mode and for its own "just try and see" probe when the diversion state already matches.

Source

Nested types