[Pkg-cups-devel] Bug#637978: cups: Please add a dpkg trigger to update PPDs on driver upgrades

Roger Leigh rleigh at codelibre.net
Tue Aug 16 09:54:17 UTC 2011


On Tue, Aug 16, 2011 at 10:14:51AM +0200, Didier Raboud wrote:
> I would like cups to implement a dpkg trigger to update it's queues' PPDs on
> driver upgrades.
> 
> This task is currently implemented (and duplicated) in each printer driver, as
> a postinst. See e.g. c2esp, m2300w, foo2zjs, epson-inkjet-printer-escpr, etc.
> 
> My initial take to solve this functionality duplication was the creation of a
> tiny cupsppupdate script and package (+ dh_* to include it nicely in the
> package building processes), that would be launched by each package's
> postinst. You can see this on the pkg-printing-tools initial repository:
> 
> 	http://anonscm.debian.org/gitweb/?p=collab-maint/pkg-printing-tools.git
> 
> But now I think this is not the right way to do it. As all drivers are
> supposed to be installable even in the absence of CUPS (aka Recommends), the
> script (and previously the postinst) checks for the presence and running status
> of CUPS, and then goes updating files under /etc/cups/.
> 
> This should IMHO be implemented on CUPS's side, as a dpkg trigger: this way,
> each time a driver would install or upgrade a file under
> /usr/lib/cups/{driver,filter}, CUPS's dpkg-trigger would schedule an update
> of its concerned queues' PPDs.
> 
> This would greatly reduce the code duplication and put the responsability to
> update the CUPS queues on CUPS' shoulders instead of putting it on each
> drivers'.

Such a tool would be great.  I wrote cups-genppdupdate as part of the
gutenprint cups driver.  Feel free to borrow from it.

Note that this is something upstream have stated an interest in in
the past.  It might be worth discussing this with them directly--they
may already be working on it, or have some insight into how to
integrate this with CUPS nicely.  Ideally CUPS itself should be able
to refresh the PPDs, at least in the common case where the PPDs are
packaged.

Does your tool preserve the options stored in the PPD, or are these
lost?  When I wrote cups-genppdupdate I had to manually parse and
merge all options, but maybe CUPS does this internally now?

It's also important to deal with PPDs which don't exist on disk;
nowadays the drivers can autogenerate their associated PPDs
(see: gutenprint).  Does your tool cope with this?  I've looked
through the script, but I wasn't entirely sure.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20110816/f94da0a7/attachment.pgp>


More information about the Pkg-cups-devel mailing list