tags 637978 + patch thanks Le mardi, 16 août 2011 10.14:51, Didier Raboud a écrit : > I would like cups to implement a dpkg trigger to update it's queues' PPDs > on driver upgrades. > (…) > I plan to provide a patch, "soon".
Here it is, please comment. Cheers, -- OdyX
diff -Nru cups-1.4.8/debian/changelog cups-1.4.8/debian/changelog --- cups-1.4.8/debian/changelog 2011-08-04 13:29:13.000000000 +0200 +++ cups-1.4.8/debian/changelog 2011-08-16 11:24:53.000000000 +0200 @@ -1,3 +1,11 @@ +cups (1.4.8-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Add a dpkg trigger to update the queues' PPDs on driver and filter + upgrades (Closes: #637978). + + -- Didier Raboud <o...@debian.org> Tue, 16 Aug 2011 11:24:44 +0200 + cups (1.4.8-2) unstable; urgency=low * debian/control: Unbreak Maintainer: field. (Closes: #636574) diff -Nru cups-1.4.8/debian/cups.postinst cups-1.4.8/debian/cups.postinst --- cups-1.4.8/debian/cups.postinst 2011-08-04 13:29:13.000000000 +0200 +++ cups-1.4.8/debian/cups.postinst 2011-08-16 11:22:11.000000000 +0200 @@ -190,13 +190,13 @@ # Do the following only if CUPS is running and the needed CUPS tools # are available -if [ "$1" = configure ] && \ +if [ "$1" = configure ] || [ "$1" = triggered ] && \ which lpstat > /dev/null 2>&1 && \ which lpinfo > /dev/null 2>&1 && \ which lpadmin > /dev/null 2>&1 && \ LC_ALL=C lpstat -h /var/run/cups/cups.sock -r | grep -v not > /dev/null 2>&1; then # Update the PPD files of all already installed print queues - driverregexp='lsb/usr/cups-included/|drv:///sample.drv/' + driverregexp='\.*' gennicknameregexp='s/,\s*\d+\.\d+[\d\.]*$//i' [ ! -z "$gennicknameregexp" ] && \ gennicknameregexp="; $gennicknameregexp" diff -Nru cups-1.4.8/debian/cups.triggers cups-1.4.8/debian/cups.triggers --- cups-1.4.8/debian/cups.triggers 1970-01-01 01:00:00.000000000 +0100 +++ cups-1.4.8/debian/cups.triggers 2011-08-16 11:24:35.000000000 +0200 @@ -0,0 +1,7 @@ +# Trigger to update CUPS' queues' PPDs +interest /usr/lib/cups/driver +interest /usr/lib/cups/filter +interest /usr/share/cups/model +interest /usr/share/cups/drv +interest /usr/share/ppd +interest /usr/share/foomatic