Select printer with lpr

On Arch Linux, I use the following command to print documents:

PRINTER="the_printer_name" lpr ~/my_doc.pdf

It was always working yet broken with the latest version. A mysterious error appears:

$ PRINTER="the_printer_name" lpr ~/my_doc.pdf
lpr: Error - scheduler not responding.

By tracing the codes, seems $PRINTER does not work. Now I have to use another pattern to specify the printer:

$ lpr -P "the_printer_name" ~/my_doc.pdf

After debugging and tracing codes, it turns out that the bug is already fixed upstream. I applied the package and rebuild CUPS. Now everything is fine :)

social