The debian utility update-alternatives from package dpkg is broken. In the following usage:
$ update-alternatives --all
update-alternatives: error: cannot scan directory `/var/lib/dpkg/alternatives': No such file or directory
It cannot be invoked to establish and configure /etc/alternatives. And the following script employing update-alternatives breaks imagemagick:
$ /usr/local/postinst/imagemagick configure
update-alternatives: error: cannot scan directory `/var/lib/dpkg/alternatives': No such file or directory
The postinst script cited above is called in the tce.installed/imagemagick script. All imagemagick executables (eg. convert, mogrify, identify) are managed with update-alternatives; when it breaks, the normal command names are not created.
Is this just broken or is eliminating this data part of intentional size reductions? I actually use /etc/alternative features "x-www-browser" and "x-terminal-emulator", but can support preserving or tossing this feature. I note update-alternatives appears in 15 of the 289 /usr/local/postinst scripts on my machine; imagemagick is first but may not be last with serious side effects.