[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#129287: marked as done (psptools: try this patch -P0 on psplpr.pl.in, supercedes #128669)



Your message dated Thu, 17 Jan 2002 15:06:16 -0500
with message-id <E16RIng-0008Jk-00@auric.debian.org>
and subject line Bug#128669: fixed in psptools 1.2.2-7
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 14 Jan 2002 23:29:42 +0000
>From theme@linuxfreemail.com Mon Jan 14 17:29:42 2002
Return-path: <theme@linuxfreemail.com>
Received: from butte_r2a1m39.in-tch.com (desktop) [216.166.189.39] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 16QGXr-0006b4-00; Mon, 14 Jan 2002 17:29:41 -0600
Received: from theme by desktop with local (Exim 3.33 #1 (Debian))
	id 16QGYS-0006wP-00
	for <submit@bugs.debian.org>; Mon, 14 Jan 2002 16:30:16 -0700
To: submit@bugs.debian.org
Subject: psptools: try this patch -P0 on psplpr.pl.in, supercedes #128669
Message-Id: <[🔎] E16QGYS-0006wP-00@desktop>
From: Don <theme@linuxfreemail.com>
Date: Mon, 14 Jan 2002 16:30:16 -0700
Delivered-To: submit@bugs.debian.org

Package: psptools
Version: 1.2.2-6
Severity: normal

This diff supercedes my #128669. There are some corrections
to the original source with a few extras, for example: 

1. The psplpr looks for %!PS-Adobe-3.0 instead of %!PS on the first line.
The PPD allfeatures are more likely to be prepended to the beginning
of the file unless the file is really DSC compliant. The parser also must have
the %%BeginSetup and %%BeginProlog, for example, in a DSC document for those
types of PPD features. So, prepending allfeatures should be more reliable.

2. The psplprdict can cause errors and is probably not used much.
The psplprprolog should not now be included routinely. Anybody who
used the /pagesetup def could see a change.

3. The -P printer form is now included. That was an outstanding item.
The old -Pprinter is still there. The rest should be easy to see. 
My perl is still not good enough.


Don
theme@linuxfreemail.com



--- psptools-1.2.2.orig/src/psplpr.pl.in	Wed Jul  3 04:49:28 1996
+++ psptools-1.2.2/src/psplpr.pl.in	Mon Jan 14 16:24:08 2002
@@ -33,6 +33,8 @@
 require 'ppd.pl';
 require 'printer.pl';
 
+$used_prog_lpr = $prog_lpr;     # default value (overridden by --output)
+
 #
 # tell_user(what)
 #
@@ -157,7 +159,7 @@
 	++$dictsz if $pagesetup;
     }
 
-    return unless $dictsz;
+    return unless ($dictsz > 1);
 
     if (!$nodsc) {
 	print "%%BeginResource: procset psplpr\n";
@@ -290,8 +292,8 @@
 	print "$who\n";
 	print "%%BoundingBox: 0 0 0 0\n%%Pages: 0\n";
 	print "%%EndComments\n";
-    } else {
-        print "%!\n";
+#    } else {
+#        print "%!\n";
     }
 
     if (!$doc) {
@@ -346,7 +348,7 @@
     }
 
     if (!$doc) {
-	print "psplprdict begin psplprsetup end\n";
+	print "psplprdict begin psplprsetup end\n" if countfeatures('PageSetup');
     }
 
     if ($doc && $dsc) {
@@ -507,22 +509,32 @@
     ignoredeps('ExitServer');
     ignoredeps('JCLSetup');
 
+    local ($allout) = 0;
+
     $_ = readpsline($conformant);
 
     if (!$_) {
-	%all_options = outputallfeatures($nodsc, !$dirty, $safer,
-	    $nonstd, $special);
+        print "%!\n%%Creator: psplpr " . localtime() . "\n";
+        print "%%EndComments\n";
+        print "%\n% " . $myname . ": outputing all features... \n";
+	%all_options = outputallfeatures($nodsc, 666, $safer,
+	    $nonstd, $special) unless $allout;
+        $allout = 1;
     } else {
 	$_ =~ s/^\004//;
 
 	local($bad);
 
-	if ($dirty || ($bad = !/^%!PS/)) {
+	if ($dirty || ($bad = !/^%!PS-Adobe-3/)) {
+            print;
+            print "% " . $myname .": Looking for PS-Adobe-3.0 DSC conforming document...\n"; 
+            print "% " . $myname .": with %%BeginProlog, %%BeginSetup, %%EndComments, etc. ... or\n";
+            print "% " . $myname .": prepending! (not DSC compliant) at " . localtime() . "\n%\n";
 	    local($first) = $_;
-
+            
 	    %all_options = outputallfeatures($nodsc, 0, $safer, $nonstd,
-	    	$special);
-
+	    	$special) unless $allout;
+            $allout = 1;
 	    if ($bad && !$dontglob) {
 		$glob = 1;
 	    }
@@ -538,13 +550,19 @@
 
 	    ++$lineno;
 
+           
 	    if (/^%%Begin/) {
 		$in_comment = 1;
 	    } elsif (/^%%End/) {
 		$in_comment = 0;
 	    }
 
-	    if (/^%%BeginProlog/) {
+            if (/^%%EndComments/) {
+                print "%%Modified: by psplpr ".localtime()."\n" if $nodsc >= 0;
+                print if $nodsc >= 0;
+                outputallfeatures ($nodsc, 0 ,$safer, $nonstd, $special) unless $allout;
+                $allout = 1;
+	    } elsif (/^%%BeginProlog/) {
 		print if $nodsc >= 0;
 		($_, $ps) = readfeatures($glob, $conformant, !$inc, !$chg,
 		    $del, $nodsc);
@@ -598,7 +616,7 @@
 	    }
 
 	    if (/^%%Page:/) {
-		local($addsc) = 0;
+		local($adddsc) = 0;
 
 		if (!$prolog_output) {
 		    outputfeatures('Prolog', $nodsc, $safer, $nonstd,
@@ -815,10 +833,15 @@
 	$opt_output = $args[1];
 	usage(1) if (!$opt_output);
 	shift @args;
-    } elsif ($args[0] eq "-${lopt_prefix}lpr") {
+    } elsif ($args[0] eq "--${lopt_prefix}lpr") {
 	$used_prog_lpr = $prog_lpr;
-    } elsif ($args[0] eq "-${lopt_prefix}lp") {
+    } elsif ($args[0] eq "--${lopt_prefix}lp") {
 	$used_prog_lpr = $prog_lp;
+    } elsif ($args[0] eq "-${opt_prefix}P") {
+        $printer = $args[1];
+        usage(1) if (($printer = $args[1]) eq '');
+        $used_prog_lpr = $prog_lpr;
+        shift @args;
     } elsif ($args[0] eq "--${lopt_prefix}verbose") {
         $opt_verbose = 1;
     } elsif ($args[0] eq "-${opt_prefix}q"

---------------------------------------
Received: (at 128669-close) by bugs.debian.org; 17 Jan 2002 20:08:12 +0000
>From troup@auric.debian.org Thu Jan 17 14:08:12 2002
Return-path: <troup@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 16RIpX-0004T3-00; Thu, 17 Jan 2002 14:08:11 -0600
Received: from troup by auric.debian.org with local (Exim 3.12 1 (Debian))
	id 16RIng-0008Jk-00; Thu, 17 Jan 2002 15:06:16 -0500
From: Colin Watson <cjwatson@debian.org>
To: 128669-close@bugs.debian.org
X-Katie: $Revision: 1.66 $
Subject: Bug#128669: fixed in psptools 1.2.2-7
Message-Id: <E16RIng-0008Jk-00@auric.debian.org>
Sender: James Troup <troup@auric.debian.org>
Date: Thu, 17 Jan 2002 15:06:16 -0500
Delivered-To: 128669-close@bugs.debian.org

We believe that the bug you reported is fixed in the latest version of
psptools, which has been installed in the Debian FTP archive:

psptools_1.2.2-7.diff.gz
  to pool/main/p/psptools/psptools_1.2.2-7.diff.gz
psptools_1.2.2-7.dsc
  to pool/main/p/psptools/psptools_1.2.2-7.dsc
psptools_1.2.2-7_all.deb
  to pool/main/p/psptools/psptools_1.2.2-7_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 128669@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated psptools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 17 Jan 2002 03:07:26 +0000
Source: psptools
Binary: psptools
Architecture: source all
Version: 1.2.2-7
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Description: 
 psptools   - Tools for PostScript printers and devices
Closes: 27273 116263 128669 129287 129414 129437 129461
Changes: 
 psptools (1.2.2-7) unstable; urgency=low
 .
   * QA upload.
   * Accept '-P printer' as well as '-Pprinter' (closes: #27273).
   * Patches from Don (closes: #128669, #129287, #129414, #129437):
     - Accept --lp and --lpr as well as -lp and -lpr.
     - Don't output psplprdict lines unless the PageSetup option is set.
     - Fix typo, $addsc -> $adddsc.
   * Append a newline to --ppdpath output (#26831 part 1).
   * Supply default locations for BSD_LPR and SYSV_LP, avoiding
     build-dependencies. Touch configure in case make decides to run
     autoconf.
   * Save the current line before outputting %%BeginSetup, and output it
     after %%EndSetup, as otherwise it got overwritten in the process of
     reading features (closes: #116263, #129461).
   * Policy version 3.5.6.
   * Perl policy version 1.20:
     - Install libraries in /usr/share/perl5 rather than /usr/lib/perl5.
Files: 
 8be742c6dc1834f5e34074bf41f70083 641 text optional psptools_1.2.2-7.dsc
 d0ea548182e7d9ff2773af4128c99e8e 9197 text optional psptools_1.2.2-7.diff.gz
 a11696419bfcf2ef3e2503db7b7ee4dc 38700 text optional psptools_1.2.2-7_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RkKz9t0zAhD6TNERAis9AJwLzH2uKSGPe31ApodayGpdMnB/yQCbBq35
bcPAWPwKmKm0QVObjJQi2qs=
=OGlD
-----END PGP SIGNATURE-----



Reply to: