Bug 35937 - parsePrintcap in qprintdialog.cpp error
parsePrintcap in qprintdialog.cpp error
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: qt (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
:
: 31371 36841 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-14 15:40 EDT by Gene Czarcinski
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-14 17:53:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix for lp=/stuff; doesn't handle Include files yet. (863 bytes, patch)
2001-04-14 17:52 EDT, Bernhard Rosenkraenzer
no flags Details | Diff

  None (edit)
Description Gene Czarcinski 2001-04-14 15:40:01 EDT
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 15:44:42 EDT
*** Bug 31371 has been marked as a duplicate of this bug. ***
Comment 2 Bernhard Rosenkraenzer 2001-04-14 17:39:08 EDT
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 17:52:57 EDT
Created attachment 15366 [details]
Fix for lp=/stuff; doesn't handle Include files yet.
Comment 4 Bernhard Rosenkraenzer 2001-04-14 17:55:11 EDT
Fixed in qt-2.3.0-4.
Comment 5 Bernhard Rosenkraenzer 2001-04-20 18:12:27 EDT
*** Bug 36841 has been marked as a duplicate of this bug. ***

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