[cups.bugs] [MOD] STR #3184: cups-driverd does not support multiple "*Product:" entries in dynamically generated PPDs

Till Kamppeter till.kamppeter at gmail.com
Wed May 6 05:54:28 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

In have seen in STR #2334 (http://www.cups.org/str.php?L2334) and STR #1900
(http://www.cups.org/str.php?L1900) that support for multiple "*Product:"
lines in PPDs was added. The result of a CUPS_GET_PPDS request is supposed
to contain all "*Product:" entries for each PPD file.

This works well if the PPD files are physically available in
/usr/share/cups/model or /usr/share/ppd, but if they are dynamically
generated by an executable in /usr/lib/cups/driver/, the cups-driverd
supports only one "*Product:" entry, supplied as a string in each line of
the answer to the "/usr/lib/cups/driver/<ppd-generator> list" call.

The add_ppd() function in cups-driverd.c simply adds the product string as
the first product entry:

strlcpy(ppd->record.products[0], product,
sizeof(ppd->record.products[0]));

My suggestion to fix it is a backward-compatible enhancement of the API
between cups-driverd and the PPD generators in /usr/lib/cups/driver/. It
would simply be that the product string supplied by the PPD generators
would contain all "*Product:" entries of the PPD separated by "|" (should
be a character which is not allowed in "*Product:" entries in PPDs). Then
cups-driverd could split the product string into the individual entries
and so pass all product entries on into the its answer to the
CUPS_GET_PPDS request.

The same should be done for the "*PSVersion:" entries.

Naturally this also needs support from the side of the PPD generators, so
consider this bug report also applying to /usr/lib/cups/driver/drv which
is also part of CUPS (and for drv there are already PPDs with multiple
"*Product:" entries, the PPDs of HPLIP).

Link: http://www.cups.org/str.php?L3184
Version: 1.3-current





More information about the cups-devel mailing list