Package: dhelp
Version: 0.6.24


dhelp uses pstotext to display PostScript files on a console or in a terminal.

pstotext stopped working with the recent update to Ghostscript 9.22. This is not only due to the deprecation of "-dDELAYBIND" in Ghostscript (which was withdrawn in 9.23) but also by an additional problem in Ghostscript.

As pstotext did not get maintained upstream for years it is better to drop it and replace it by the ps2txt utility of Ghostscript. ps2txt's compatibility with the Ghostscript it comes with is assured as they are maintained together.

pstotext is only used by dhelp, so to eliminate it from the distro it is enough to update the appropriate command lines in dhelp and the autopkgtest in the doc-rfc package (Debian bug #895541).

See also Debian bug #895513 about the pstotext issue.

Attached is my patch on the dhelp package as I have applied it in Ubuntu (0.6.24-0ubuntu1).

--- a/scripts/conv-pstotext
+++ b/scripts/conv-pstotext
@@ -6,7 +6,7 @@
 # $1 = Input file, $2 = Output file
-2>/dev/null pstotext -output "${2}" "${1}"
+2>/dev/null ps2txt "${1}" "${2}"
 if [ ${EXITVAL} -ne 0 ]; then
 	echo "Error converting file: ${1}"
--- a/src/dsearch
+++ b/src/dsearch
@@ -148,17 +148,17 @@
             $text = `/usr/bin/pdftotext "$file" -`;
         else {
-            # pstotext is a dependency, so this should never fail, but we
+            # ghostscript is a dependency, so ps2txt should never fail, but we
             # recommend the user to install xpdf-utils instead, to get
             # pdftotext (better extraction quality and much faster)
-            $text = file_to_text("/usr/bin/pstotext '$file'", "PDF", "xpdf-utils");
+            $text = file_to_text("/usr/bin/ps2txt '$file'", "PDF", "xpdf-utils");
     elsif ($ext =~ /dvi/) {
         $text = file_to_text("/usr/bin/catdvi '$file'", "DVI", "catdvi");
     elsif ($ext =~ /ps/) {
-        $text = file_to_text("/usr/bin/pstotext '$file'", "Postscript", "pstotext");
+        $text = file_to_text("/usr/bin/ps2txt '$file'", "Postscript", "ghostscript");
     else {
         open F, $file;

Reply via email to