Bug 35937

Summary: parsePrintcap in qprintdialog.cpp error
Product: [Retired] Red Hat Linux Reporter: Gene Czarcinski <gczarcinski>
Component: qtAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-14 21:53:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix for lp=/stuff; doesn't handle Include files yet. none

Description Gene Czarcinski 2001-04-14 19:40:01 UTC
RedHat:  please mark this "non beta only" once seawolf is offical.

This was originally reported against kmail since that was the only
application that appears to use qt's print function.

The problem is that the "simplistic" parsing in the function parsePrintcap
in qprintdialog.cpp considers everything between the beginning of a printer
definition and a '|' character to be the "name" of a print queue, it has
problems with the /etc/printcap created by RedHat's new printconf package.
 A Unix printer queue is handled properly but not a JetDirect queue.  The
following definition DOES NOT work:

lp:\
	:sh:\
	:ml=0:\
	:mx=0:\
	:sd=/var/spool/lpd/lp:\
	:lp=|/usr/share/printconf/jetdirectprint:\
	:lpd_bounce=true:\
	:if=/usr/share/printconf/mf_wrapper:

Everything starting with "lp:" and stopping at the '|' after "lp=" is
treated as the print queue "name".

Circumvention:  Define the print queue as a remote Unix Printer OR define
another Unix printer (e.g., lp1) pointing to 127.0.0.1 for queue lp OR give
lp an alias (!).  All of these seem to work properly (at least for my kmail
test case).  Looking at the printcap man page, the use of '|' to indicate
piping the output seems to be proper.  However, it is still a problem with
the parsing of /etc/printcap.

Another thing I noticed about the parsePrintcap function is that it does
not seem to handle "include" processing so that if you had everything in an
included file it would not find any printers defined.

Comment 1 Gene Czarcinski 2001-04-14 19:44:42 UTC
*** Bug 31371 has been marked as a duplicate of this bug. ***

Comment 2 Bernhard Rosenkraenzer 2001-04-14 21:39:08 UTC
Qt is doing the right thing for "normal" printcaps... It just doesn't know 
about LPRng extensions. Fixing.


Comment 3 Bernhard Rosenkraenzer 2001-04-14 21:52:57 UTC
Created attachment 15366 [details]
Fix for lp=/stuff; doesn't handle Include files yet.

Comment 4 Bernhard Rosenkraenzer 2001-04-14 21:55:11 UTC
Fixed in qt-2.3.0-4.


Comment 5 Bernhard Rosenkraenzer 2001-04-20 22:12:27 UTC
*** Bug 36841 has been marked as a duplicate of this bug. ***