/usr/bin/lp on Trusty using -h option doesn't work as expected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups (Ubuntu) |
Fix Released
|
Medium
|
Louis Bouchard | ||
Trusty |
Fix Released
|
Medium
|
Louis Bouchard | ||
Utopic |
Fix Released
|
Medium
|
Louis Bouchard |
Bug Description
[SRU justification]
The -h option should override the value stored in the CUPS_SERVER environment variable
[Impact]
Without this fix, user is unable to define the printserver to use with the -h option
[Fix]
Verify if the -h option has defined the printserver before using CUPS_SERVER to define it.
[Test Case]
$ export CUPS_SERVER="blah"
$ lp -h {valid printserver} -d {printqueue} /etc/hosts
Without the fix :
lp: No such file or directory
With the fix :
request id is {printqueue}-37 (1 file(s))
[Regression]
None expected. New code path (from upstream patch) is only triggered if
-h option is used.
[Original description of the problem]
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
cups-client:
Installed: 1.7.2-0ubuntu1.1
3) What you expected to happen
When using lp -h to send a print job to a printer, I expected to the job to be sent to the printer and to override any env variables set or conf file setting
4) What happened instead
To summarise the behaviour I'm seeing
1) with CUPS_SERVER env variable unset and no ServerName set in /etc/cups/
Using IPs sends the job to the printer as expected.
2) with CUPS_SERVER env variable set using hostname with/without port and no ServerName set in /etc/cups/
3) with CUPS_SERVER env variable set using IP address with/without port and no ServerName set in /etc/cups/
===
with CUPS_SERVER env variable unset and no ServerName option set in /etc/cups/
$ lp test2.txt
lp: Error - scheduler not responding. (expected as no server is set or specified)
Using hostname
$ lp -h server1:631 test2.txt
lp: Error - add '/version=1.1' to server name.
$ lp -h server1 test2.txt
lp: Error - add '/version=1.1' to server name.
Using IP address
$ lp -h 192.168.254.8 test2.txt
request id is PDF-54 (1 file(s))
$ lp -h 192.168.254.8:631 test2.txt
request id is PDF-55 (1 file(s))
===
With CUPS_SERVER env variable *set CUPS_SERVER=server1
$ lp test2.txt
lp: Error - add '/version=1.1' to server name.
Using hostname
$ lp -h server1 test2.txt
lp: Error - add '/version=1.1' to server name.
$ lp -h server1:631 test2.txt
lp: Error - add '/version=1.1' to server name.
Using IP address
$ lp -h 192.168.254.8 test2.txt
lp: Error - add '/version=1.1' to server name.
$ lp -h 192.168.254.8:631 test2.txt
request id is PDF-56 (1 file(s))
===
With CUPS_SERVER env variable *set CUPS_SERVER=
Same results as above
===
With CUPS_SERVER env variable *set CUPS_SERVER=
$ lp -h 555.555.555.555 test2.txt
request id is PDF-66 (1 file(s))
===
With CUPS_SERVER env variable *set CUPS_SERVER=
Same results as above
Changed in cups (Ubuntu): | |
importance: | Undecided → Medium |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
tags: | added: cts |
tags: | added: patch |
Changed in cups (Ubuntu Trusty): | |
status: | Confirmed → In Progress |
Changed in cups (Ubuntu Utopic): | |
status: | Confirmed → In Progress |
Changed in cups (Ubuntu Trusty): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in cups (Ubuntu Utopic): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.