OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
1.09k stars 195 forks source link

Unable to set xxx-default values for temporary queues using lpadmin #237

Closed zdohnal closed 7 months ago

zdohnal commented 3 years ago

Found out during OpenPrinting/cups-local#2 .

The temporary queue is shown via lpstat -e and not via lpstat -a. But once an user wants to change its job default options (shown by lpoptions -p <queue>), the temporary queue is shown in lpstat -a output with /dev/null device uri and the option isn't applied according lpoptions -p <queue> output.

How to produce:

$ lpadmin -p <temp_queue> -o copies-default=2

Actual results:

$ lpoptions -p HP_LaserJet_M1536dnf_MFP_42307C_
device-uri=ipp://HP%20LaserJet%20M1536dnf%20MFP%20(42307C)._ipp._tcp.local/ printer-info='HP LaserJet M1536dnf MFP (42307C)' printer-location printer-make-and-model='HP LaserJet M1536dnf MFP' printer-type=83886100
$ lpstat -v
device for HP_LaserJet_M1536dnf_MFP_42307C_: ///dev/null

Expected output: New default job option value showed in lpoptions and applied to a job by default.

Additional info: Changing printer default options (lpoptions -p <queue> -o Duplex=DuplexTumble) seems to work.

michaelrsweet commented 3 years ago

This is a side-effect of setting default options for a queue - that requires cupsd to convert the queue to permanent, but I can have cupsd return an error unless "printer-is-temporary=false" is added to the lpadmin options.

michaelrsweet commented 7 months ago

[master 88150a393] Report an error if you use lpadmin to set defaults for a temporary queue (Issue #237)

[2.4.x dce85e17e] Report an error if you use lpadmin to set defaults for a temporary queue (Issue #237)