michaelrsweet / pappl

PAPPL - Printer Application Framework
https://www.msweet.org/pappl
Apache License 2.0
309 stars 49 forks source link

`modify` command ignores `-m` and `-v` options silently #327

Closed proski closed 9 months ago

proski commented 9 months ago

Describe the bug

lprint modify accepts options to modify the device URL and the driver. However, those options are ignored silently.

To Reproduce Steps to reproduce the behavior:

  1. Start lprint server as unprivileged user
  2. Create a new printer: lprint add -d LocalPrinter -m zpl_4inch-300dpi-tt -v usb://XP/Printer/
  3. Modify the printer: lprint add -d LocalPrinter -m zpl_4inch-300dpi-tt -v usb://XP/Printer/
  4. Shut down the server: lprint shutdown (this may need to be run multiple times)
  5. Inspect ~/.lprint.conf with grep usb: ~/.lprint.conf

Expected behavior Ideal: The parameters are accepted and saved.

Acceptable: The parameters are rejected and the lprint-modify manual page is modified to remove unsupported parameters.

Screenshots If applicable, add screenshots to help explain your problem.

$ ./lprint add -d LocalPrinter -m zpl_4inch-300dpi-tt -v usb://XP/Printer/
$ ./lprint modify -d LocalPrinter -m zpl_4inch-600dpi-tt -v usb://PX/Printer/
$ ./lprint shutdown
$ ./lprint shutdown
$ ./lprint shutdown
$ grep usb: ~/.lprint.conf
<Printer did="" driver="zpl_4inch-300dpi-tt" id="13" name="LocalPrinter" state="3" uri="usb://XP/Printer/">
$

System Information:

Additional context It appears that the whole command line handling is done in in pappl, so the issue is opened for pappl.

michaelrsweet commented 9 months ago

Not a bug.

You cannot modify the device URI or driver after creating the printer. This is on purpose.