[Pkg-cups-devel] r632 - in cupsys/trunk: . debian

Martin Pitt mpitt at alioth.debian.org
Fri Nov 30 17:33:37 UTC 2007


Author: mpitt
Date: Fri Nov 30 17:33:37 2007
New Revision: 632

Log:
* debian/postinst: Activate new backends (since Etch) by default on
  upgrades. This affects snmp, scsi, serial, and dnssd.

Modified:
   cupsys/trunk/   (props changed)
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/cupsys.postinst

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Fri Nov 30 17:33:37 2007
@@ -24,8 +24,10 @@
     Install new backend.
   * debian/control: Add Recommends: to avahi-utils; if it is installed, the
     dnssd backend can actually work.
+  * debian/postinst: Activate new backends (since Etch) by default on
+    upgrades. This affects snmp, scsi, serial, and dnssd.
 
- -- Kenshi Muto <kmuto at debian.org>  Fri, 30 Nov 2007 17:30:39 +0100
+ -- Kenshi Muto <kmuto at debian.org>  Fri, 30 Nov 2007 18:28:49 +0100
 
 cupsys (1.3.4-1) unstable; urgency=high
 

Modified: cupsys/trunk/debian/cupsys.postinst
==============================================================================
--- cupsys/trunk/debian/cupsys.postinst	(original)
+++ cupsys/trunk/debian/cupsys.postinst	Fri Nov 30 17:33:37 2007
@@ -103,6 +103,20 @@
 	done
 	IFS=$save_IFS
 
+	# activate new backends on upgrades
+	db_fset cupsys/backend changed false
+	
+	if dpkg --compare-versions "$2" lt-nl "1.3.4-2"; then
+	    for module in snmp scsi serial dnssd; do
+	        [ -e /usr/lib/cups/backend/$module ] || \
+	        ln /usr/lib/cups/backend-available/$module /usr/lib/cups/backend/$module
+	    done
+	fi
+	
+	# Resync Debconf database with real state
+	list=`( cd /usr/lib/cups/backend && for f in ipp lpd parallel scsi serial socket usb snmp dnssd; do [ -e $f ] && echo -n "$f, "; done ) | sed -e 's/, $//'`
+	db_set cupsys/backend $list;
+
 	if [ -f /etc/cups/classes.conf ]; then
 	  chown root:lp /etc/cups/classes.conf ; chmod 600 /etc/cups/classes.conf
 	fi



More information about the Pkg-cups-devel mailing list