[Pkg-gmagick-im-team] Bug#906674: imagemagick: Sub-commands by default are symlinked into PATH (/usr/bin), "import" is a problem
Zenaan Harkness
zenaan at freedbms.net
Sun Aug 19 16:10:23 BST 2018
Package: imagemagick
Version: 8:6.9.7.4+dfsg-11+deb9u5
Severity: normal
Tags: upstream
Dear Maintainer,
Bash has flexible similarity between scripts and the REPL/command shell.
Enhancing the shell requires choosing and using a name - a name identifies a
command, program, script (file), function, alias or variable (etc).
Newer ImageMagick (IM) versions provide the command "magick" which has the
traditional IM commands as subcommands of this "magick" command, e.g.
magick convert ...
magick import ...
This is similar to the way Git and other ("relatively modern") programs are
structured.
IM's "import" command, when in the global PATH at /usr/bin, dominates this
namespace - i.e. the name "import" gets in the way of using the word "import"
for other purposes, for example in the project I am gestating, enhancing Bash to
provide for import of modules, and in this case the name "import" is the natural
name for this function.
Now XFCE (my desktop) seems to want ImageMagick (perhaps for its printing
subsystem), and so the program name "import" gets in the way of this little
project I'm developing - especially when trying to debug a problem, and when for
some reason I have an "import module" problem, IM's import program first
baffles, then gets in the way, and finally, seems to dump random files around
the place.
It seems the name "import" is merely a symlink to the actual program in
"alternatives", which provides for removing the /usr/bin/import link using
update-alternatives, however as the update-alternatives man page says, the
"generic name" is meant to choose one of the corresponding "files providing
interchangeable functionality", and so the obvious problem is other packages
(e.g. the XFCE printing (cups?) subsystem) depending on "/usr/bin/import" rather
than on say /usr/bin/import-im6.q16 - so I don't know if there are such
dependencies, but if there are, then a transition period is required to wean the
reverse dependencies of ImageMagick off of the generic "PATH" names such as
import, identify and display, and onto the "/usr/bin/magick import" etc. - thus
this bug report/ feature request.
Philosophically, programs (such as IM) ought not dominate the top level program
name space, especially for the more generic names including the examples given
above - by avoiding such namespace domination, greater room is provided to
future hackers to tinker and expand their systems in ways we have not yet
thought of.
-- System Information:
Debian Release: 9.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-7-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_zen.UTF-8, LC_CTYPE=en_zen.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_zen.UTF-8), LANGUAGE=en_zen.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_zen.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages imagemagick depends on:
ii imagemagick-6.q16 8:6.9.7.4+dfsg-11+deb9u5
imagemagick recommends no packages.
imagemagick suggests no packages.
More information about the Pkg-gmagick-im-team
mailing list