[cups.bugs] [MOD] STR #3469: ppdc not prepending the Manufacturer name to the ModelName directive consistenly

Smith Kennedy smith.kennedy at hp.com
Thu Jan 7 12:55:09 PST 2010


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

[STR New]

Summary: 
----------
The documentation for the ModelName ppdc directive:

http://localhost:631/help/ref-ppdcfile.html#ModelName

says that the manufacturer name "should not begin with the manufacturer
name since the PPD compiler will add this automatically for you".  While
ppdc will in most cases do this, it fails to prefix the file name with the
Manufacturer, when ppdc is given the "-m" option.

The ppdc PPD compiler will generate *ModelName keywords values that are
basically of the form:

*ModelName: "[Manufacturer directive value] [ModelName directive value]"

When ppdc is given the "-m" option, it is supposed to produce files named
with the "ModelName" directive value.  This is inconsistent with how the
ModelName directive is processed into the *ModelName keyword. seems to be
doing this only using the ModelName directive value, and not prepending
the Manufacturer directive value.  My expectation is that the two should
be generated consistently with one another.

Interestingly, if one were to do this:

ppdc -d . -m /usr/share/cups/examples/minimum.drv 

which generates PPDs from a standard CUPS DRV file example, the result of
this command seems to be "doubly broken": not only does the name of the
file produced lack the Manufacturer string prefix (it is named "FooJet
2000") but it would have the following *ModelName keyword statement as
well:

*ModelName: "FooJet 2000"

Which means that, for some reason, "Foo" is not considered by ppdc to be a
legitimate manufacturer string, and it isn't prefixing the *ModelName
keyword value with that string either.  If the minimum.drv is copied to
the local directory and changed to have the Manufacturer value be "HP",
then doing this:

ppdc -d . -m ./minimum.drv

would still produce a file named "FooJet 2000" (broken, it should be "HP
FooJet 2000") but it would at least correctly have prefixed the *ModelName
keyword value with the Manufacturer string value:

*ModelName: "HP FooJet 2000"

It may be needed to leave the existing "-m" behavior in place to maintain
backward compatibility.  In that case, implementing a new "-M" option
would be an accpetable fix for the file naming problem.




Steps to Reproduce:
----------
1. Open a Terminal window in Mac OS X 10.6
2. type "ppdc -d ./original -m /usr/share/cups/examples/minimum.drv" and
hit return
3. Download the attached "minimum-modified.drv" file, that has been
modified 
4. type "ppdc -d ./modified -m minimum-modified.drv" and hit return
 

Expected Results:
----------
The file "./original/Foo FooJet 2000" exists, and contains the following
lines:
*Manufacturer: "Foo"
*ModelName: "Foo FooJet 2000"

The file "./modified/HP FooJet 2000" exists, and contains the following
lines:
*Manufacturer: "HP"
*ModelName: "HP FooJet 2000"


Actual Results (step 2):
-------------------------

The file "./original/FooJet 2000" exists, and contains the following
lines:
*Manufacturer: "Foo"
*ModelName: "FooJet 2000"

This is broken becuase the file name string should start with the
Manufacturer name but does not, and because the *ModelName keyword value
also should be prefixed with the Manufacturer string, but does not.


Actual Results (step 4):
-------------------------

The file "./modified/FooJet 2000" exists, and contains the following
lines:
*Manufacturer: "HP"
*ModelName: "HP FooJet 2000"

This is broken becuase the file name string should start with the
Manufacturer name but does not.



Regression:
----------
Tested on Mac OS X 10.6.2 / CUPS 1.4.2 and Ubuntu Linux 9.10 / CUPS
1.4.1.  Results were the same.

Link: http://www.cups.org/str.php?L3469
Version: 1.4.2





More information about the cups-devel mailing list