Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian: Fix conversion of PPD InputSlot choice names #23

Merged
merged 1 commit into from
Nov 4, 2020
Merged

Debian: Fix conversion of PPD InputSlot choice names #23

merged 1 commit into from
Nov 4, 2020

Conversation

OdyX
Copy link
Contributor

@OdyX OdyX commented Nov 4, 2020

When I create a CUPS queue with a PPD file with choice names "Tray-1", "Tray-2",
... in the InputSlot option CUPS translates these names to double-dashed IPP
attribute names: "tray--1", "tray--2", ... in the "media-source" attribute, both
when passing a job to the printer with the IPP backend, making the printer
ignore the tray choice, and also when answering a get-printer-attributes IPP
request from a client. This happens when in the PPD a dash is followed by a
digit, as the pwg_unppdize_name() function in cups/ppd-cache.c inserts a dash
whenever a non-digit is followed by a digit in the PPD name. As IPP attribute
names generally never have double-dashes and also no dashes in the beginning or
the end of the name, I have modified the pwg_unppdize_name() function
appropriately.

Bug: apple/cups#5740
Bug-Debian: https://bugs.debian.org/949315

When I create a CUPS queue with a PPD file with choice names "Tray-1", "Tray-2",
... in the InputSlot option CUPS translates these names to double-dashed IPP
attribute names: "tray--1", "tray--2", ... in the "media-source" attribute, both
when passing a job to the printer with the IPP backend, making the printer
ignore the tray choice, and also when answering a get-printer-attributes IPP
request from a client. This happens when in the PPD a dash is followed by a
digit, as the pwg_unppdize_name() function in cups/ppd-cache.c inserts a dash
whenever a non-digit is followed by a digit in the PPD name. As IPP attribute
names generally never have double-dashes and also no dashes in the beginning or
the end of the name, I have modified the pwg_unppdize_name() function
appropriately.

Bug: apple/cups#5740
Bug-Debian: https://bugs.debian.org/949315
@michaelrsweet michaelrsweet merged commit 7055a0f into OpenPrinting:master Nov 4, 2020
@michaelrsweet michaelrsweet self-assigned this Nov 4, 2020
@michaelrsweet michaelrsweet added bug Something isn't working priority-low labels Nov 4, 2020
@michaelrsweet michaelrsweet added this to the v2.3.3op1 milestone Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants