[Pkg-cups-devel] r368 - cupsys/branches/cups-1.2/debian

Kenshi Muto kmuto at costa.debian.org
Fri Sep 15 13:13:05 UTC 2006


Author: kmuto
Date: Fri Sep 15 13:13:05 2006
New Revision: 368

Modified:
   cupsys/branches/cups-1.2/debian/changelog
   cupsys/branches/cups-1.2/debian/cupsys.postinst

Log:
only if old version is between 1.1.23-13 to 1.2.1-2, do merge. (#386551)

Modified: cupsys/branches/cups-1.2/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2/debian/changelog	(original)
+++ cupsys/branches/cups-1.2/debian/changelog	Fri Sep 15 13:13:05 2006
@@ -14,6 +14,8 @@
   * 62_classes_crash: fix incorrect code. old code returned an error
     even if user use the correct class configuration. (closes: #380663, #384654)
   * bump up libcupsys2.shlibs version to 1.2.3. (closes: #385724)
+  * Merge old separated style configuration to the single format
+    only if user upgraded from an affected version. (closes: #386551)
 
  -- Kenshi Muto <kmuto at debian.org>  Fri,  8 Sep 2006 11:28:12 +0200
 

Modified: cupsys/branches/cups-1.2/debian/cupsys.postinst
==============================================================================
--- cupsys/branches/cups-1.2/debian/cupsys.postinst	(original)
+++ cupsys/branches/cups-1.2/debian/cupsys.postinst	Fri Sep 15 13:13:05 2006
@@ -129,11 +129,13 @@
 	#fi
 
 	# Revert to single file
-	if [ -f /etc/cups/cups.d/ports.conf -o -f /etc/cups/cups.d/browse.conf ]; then
-	  perl -e 'sub readfile { local($_) = @_; open(F, $_); while (<F>) { print; } }; while (<STDIN>) { s#^Include\s+(/etc/cups/cups.d/(?:ports.conf|browse.conf))#&readfile($1)#ei; print;}' < /etc/cups/cupsd.conf > /etc/cups/cupsd.conf.$$
-	  mv /etc/cups/cupsd.conf.$$ /etc/cups/cupsd.conf
-	  rm -f /etc/cups/cups.d/ports.conf /etc/cups/cups.d/browse.conf
-	  rmdir /etc/cups/cups.d 2>/dev/null || /bin/true
+	if [ $(dpkg --compare-versions "$2" gt 1.1.23-12 && dpkg --compare-versions "$2" lt 1.2.1-3 && echo "yes") ]; then
+	  if [ -f /etc/cups/cups.d/ports.conf -o -f /etc/cups/cups.d/browse.conf ]; then
+	    perl -e 'sub readfile { local($_) = @_; open(F, $_); while (<F>) { print; } }; while (<STDIN>) { s#^Include\s+(/etc/cups/cups.d/(?:ports.conf|browse.conf))#&readfile($1)#ei; print;}' < /etc/cups/cupsd.conf > /etc/cups/cupsd.conf.$$
+	    mv /etc/cups/cupsd.conf.$$ /etc/cups/cupsd.conf
+	    rm -f /etc/cups/cups.d/ports.conf /etc/cups/cups.d/browse.conf
+	    rmdir /etc/cups/cups.d 2>/dev/null || /bin/true
+	  fi
 	fi
 	#
 	# Create /etc/cups/cups.d/ports.conf and /etc/cups/cups.d/browse.conf



More information about the Pkg-cups-devel mailing list