TODO:

* Reimplement some calls to dpkg with Dpkg::* Perl modules, especially
  &dpkg_cmp with Dpkg::Version::version_compare_relation() or
  Dpkg::Version::version_compare().

* Figure out what causes #998372.
