Ticket #710 (closed defect: fixed)
LPRng printing broken
Reported by: | jdreed | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | Fall 2010 |
Component: | -- | Keywords: | |
Cc: | Fixed in version: | ||
Upstream bug: |
Description
jdreed@INFINITE-LOOP:~$ lpr -Pw20thesis lpr: missing argument for 'm' Usage: lpr [-Pprinter[@host]] [-A] [-B] [-Cclass] [-Fformat] [-G] [-Jinfo] [-(K|#)copies] [-Q] [-Raccountname] [-Ttitle] [-Uuser[@host]] [-V] [-Zoptions] [-b] [-m mailaddr] [-h] [-i indent] [-l] [-w width ] [-r] [-Ddebugopt ] [--] [ filenames ... ]
The problem is this block:
if not zephyr_args and os.environ.get('ATHENA_USER'): if argstyle == common.SYSTEM_CUPS: options.append(('-m', '')) elif argstyle == common.SYSTEM_LPRNG: options.append(('-m', 'zephyr%' + os.environ['ATHENA_USER']))
An invocation like lpr -Pw20thesis counts as "CUPS argument style", and therefore gets -m appended to it. However, it's an LPRng queue, so that fails.
Change History
Note: See
TracTickets for help on using
tickets.
Fixed in r24856-r24858. It now checks for LPRng argstyle, then checks the subsystem to see if it'll be invoking CUPS or LPRng.
I also added a unit test for this, but we should use the manual test suite this time as well.