Package: swi-prolog-nox
Version: 5.10.1-1
Severity: minor

swi-prolog installs a symlink from /usr/bin/prolog to /usr/bin/swipl
using the Debian alternatives mechanism. However, it behaves
differently depending on whether it is invoked as "prolog" or "swipl".
For example, if swi-prolog-x is installed, "swipl -g emacs" starts SWI
Prolog's emacs-like editor, but "prolog -g emacs" gives an error.

The reason for this is that the swipl binary uses the name it is
invoked with to locate its start-up file (see the description of the
-F option in swipl(1)). Specifically, if invoked as "prolog", it looks
for a start-up file under /usr/lib/swi-prolog/prolog.rc and various
related names, none of which exist. This can be observed by running
"strace prolog -g halt". If invoked as "swipl", it successfully loads
/usr/lib/swi-prolog/swipl.rc

Suggested fixes, all untested:

* create a shell script wrapper that runs swipl and point the
  /usr/bin/prolog symlink at that.

* create a symlink /usr/lib/swi-prolog/prolog.rc pointing to
  /usr/lib/swi-prolog/swipl.rc

The binary /usr/bin/xpce in the swi-prolog-x package, which is also a
symlink to the swipl binary, seems to be affected by similar problems:
It tries to load /usr/lib/swi-prolog/xpce.rc, which doesn't exist
(though /usr/lib/swi-prolog/xpce-6.6.66/pl/xpce.rc does).



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to