Bug 57371 - PJL commands fail to prepend and append to ghostscript
PJL commands fail to prepend and append to ghostscript
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: foomatic (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-10 20:07 EST by degraaf
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-26 09:24:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
lpdomatic doesn't append PJL; patch to fix. (4.78 KB, patch)
2001-12-10 20:10 EST, degraaf
no flags Details | Diff

  None (edit)
Description degraaf 2001-12-10 20:07:19 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-13custom i686)

Description of problem:
Explanation attached.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Set  'pjl' => 1,
in /var/spool/lpd/minolta/ljet4-66528.foo
2. Set  my $debug=1;  
in /usr/sbin/lpdomatic and add extra debug prints
3. Print something and note missing prepend and append.
4. Fix logic tests and repeat.  Prepend and append work.
	

Additional info:
Comment 1 degraaf 2001-12-10 20:10:15 EST
Created attachment 40327 [details]
lpdomatic doesn't append PJL; patch to fix.
Comment 2 Tim Waugh 2002-01-08 12:56:26 EST
Thanks for the patch.  It looks correct, yes.
Comment 3 Tim Waugh 2002-02-08 03:59:09 EST
Fixed in RHBA-2001:174.
Comment 4 Tim Waugh 2002-03-05 08:07:23 EST
This incorrect change has been reverted.
Comment 5 Tim Waugh 2002-04-25 05:57:34 EDT
(foomatic-1.1-0.20020313.3)
Comment 6 degraaf 2002-06-15 19:15:47 EDT
Dammit, you've screwed up lpdomatic again in 7.3.
We're back to the same error that I bitched about in Dec 2001.
Comment 7 degraaf 2002-06-15 19:22:34 EDT
Well, I can't seem to find any way to attach my carefully crafted message.  :-)
So I'll just cut and paste it into this god-forsaken editor...


Dammit, you've screwed up lpdomatic again in 7.3.
We're back to the same error that I bitched about in Dec 2001.

I complained that lpdomatic was failing to send PJL commands to the
printer despite constructing them correctly.

On 8 Jan 2002 you said:
  +------- Additional comments from twaugh@redhat.com 2002-01-08 12:56:26 -----
  +Thanks for the patch.  It looks correct, yes.

On 8 Feb 2002 you said:
  +------- Additional comments from twaugh@redhat.com 2002-02-08 03:59:09 -------
  +Fixed in RHBA-2001:174.

On 5 Mar 2002 you said:
  +------- Additional comments from twaugh@redhat.com 2002-03-05 08:07:23 -------
  +This incorrect change has been reverted.


Well, it may be an "incorrect change", but the code is most certainly
incorrect as it was, and as it is now - "reverted".
I had assumed you'd found a better way to fix the problem.
You haven't.  I stand by my original complaint (and patch).

Sheesh!

This is a very subtle error, and requires careful testing to ensure
that it's really fixed.  Without the patch my printer fails to enter
"sleep mode" and wastes power.  Unacceptable!

Here's the diff to fix the problem with lpdomatic from
foomatic-1.1-0.20020313.3

# diff -c /usr/sbin/lpdomatic.7.3 /usr/sbin/lpdomatic
*** /usr/sbin/lpdomatic.7.3     Thu Apr  4 03:30:15 2002
--- /usr/sbin/lpdomatic Sat Jun 15 18:29:27 2002
***************
*** 799,811 ****
                print $fileh @pjlprepend;
            }
            while (<KID4_IN>) {
                print $fileh $_;
            }
!           if ( @pjlprepend > 1 ) {
                print $fileh @pjlappend;
            }

--- 799,811 ----

            # wrap the PJL around the job data, if there are any
            # options specified...
!           if ( @pjlprepend > 0 ) {
                print $fileh @pjlprepend;
            }
            while (<KID4_IN>) {
                print $fileh $_;
            }
!           if ( @pjlprepend > 0 ) {
                print $fileh @pjlappend;
            }




Comment 8 Tim Waugh 2002-06-17 08:42:02 EDT
Unfortunately although this change seems correct, it breaks for a great many 
printers.  This is because the foomatic printer database has lots of printers 
marked as PJL capable when in fact they aren't.  This issue (and your above 
proposed change) is known about upstream, but requires extensive fixes to the 
database first.  These changes are underway, but it is a slow process. :-(

Note You need to log in before you can comment on or make changes to this bug.