dpkg-divert improvements
Please use dpkg-divert
anywhere it’s available, not just on Debian.
Examples:
• *buntu and other Debian derivatives
• Atari FreeMiNT, for which a dpkg
-based distribution (otherwise independent of Debian) exists
• people using the dpkg
toolchain on Interix, Maemo, …
Also, consider falling back to renaming if unwrapping with dpkg-divert
fails (or perhaps check with dpkg-divert --list
?); something else might have removed the diversion, or (on the non-Debian-derivative use case) someone might have removed the dpkg toolchain.
Finally, consider an option to not use dpkg-divert
even if it exists, e.g. because the file is already diverted. (This effects the unwrapping point in the preceding paragraph.)