diff -Nru gutenprint-5.2.8~pre1/debian/changelog gutenprint-5.2.8~pre1/debian/changelog --- gutenprint-5.2.8~pre1/debian/changelog 2012-02-14 22:54:45.000000000 +0000 +++ gutenprint-5.2.8~pre1/debian/changelog 2012-03-22 14:01:04.000000000 +0000 @@ -1,3 +1,13 @@ +gutenprint (5.2.8~pre1-0ubuntu2) precise; urgency=low + + * debian/printer-driver-gutenprint.postinst: Use old method to update the + PPDs of existing print queues on the transition from Gutenprint 5.2.7 to + 5.2.8 (LP: #932882, LP: #960496). + * debian/printer-driver-gutenprint.ppd-updater: Improvement of NickName + matching rules. + + -- Till Kamppeter Thu, 22 Mar 2012 15:00:00 +0100 + gutenprint (5.2.8~pre1-0ubuntu1) precise; urgency=low * New upstream release diff -Nru gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.postinst gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.postinst --- gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.postinst 1970-01-01 00:00:00.000000000 +0000 +++ gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.postinst 2012-03-22 13:53:18.000000000 +0000 @@ -0,0 +1,53 @@ +#! /bin/sh +# postinst script for cups-driver-gutenprint +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +#s/^if\s+\[\s+"\$1"\s+=\s+"configure"\s+\];\s+then\s+ldconfig\b//m; + +if [ "$1" = "configure" ]; then + + if dpkg --compare-versions "$2" lt-nl "5.2.8~pre1-0ubuntu1"; then + # For the transition from Gutenprint 5.2.7 to 5.2.8 still use the + # old method of updating existing PPD files + # Upgrade in-use PPD files, continue on any failure + cups-genppdupdate || true + # Restart CUPS (to register new and updated PPDs) + [ -x /etc/init.d/cups ] && invoke-rc.d cups force-reload || true + # Wait for the CUPS daemon getting ready after reloading it + for i in 1 2 3 4 5; do if [ -r /var/run/cups/cups.sock ]; then break; fi; sleep 1; echo -n "."; done; echo; + fi + +elif [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] || [ "$1" = "abort-deconfigure" ]; then + : +else + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff -Nru gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.ppd-updater gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.ppd-updater --- gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.ppd-updater 2012-02-14 22:52:30.000000000 +0000 +++ gutenprint-5.2.8~pre1/debian/printer-driver-gutenprint.ppd-updater 2012-03-22 13:52:43.000000000 +0000 @@ -1,2 +1,2 @@ DRIVER_REGEXP='^gutenprint' -GENNICKNAME_REGEXP='s/ LF / Large Format /; s/-simplified//; s/\s*Simplified//; s/\s*v[\d\.]*(|-pre\d+)\s*$//; s/\.[\d\.]*(|-pre\d+)$//; s/ Foomatic\/gutenprint-ijs/ - CUPS+Gutenprint/i' +GENNICKNAME_REGEXP='s/ LF / Large Format /; s/-simplified//; s/\s*Simplified//; s/\s+Foomatic\/gutenprint-ijs/ - CUPS+Gutenprint/i; s/\s*v[\d\.]*(|-pre\d+)\s*$//; s/\.[\d\.]*(|-pre\d+)\s*$//'