[Pkg-bugzilla-commits] r67 - trunk/bugzilla-2.18/debian

Alexis Sukrieh sukria-guest@costa.debian.org
Fri, 22 Apr 2005 11:46:25 +0000


Author: sukria-guest
Date: 2005-04-22 11:46:24 +0000 (Fri, 22 Apr 2005)
New Revision: 67

Modified:
   trunk/bugzilla-2.18/debian/bugzilla.postinst
   trunk/bugzilla-2.18/debian/bugzilla.templates
Log:
better handling of ucf, we don't overuse it

Modified: trunk/bugzilla-2.18/debian/bugzilla.postinst
===================================================================
--- trunk/bugzilla-2.18/debian/bugzilla.postinst	2005-04-22 10:48:04 UTC (rev 66)
+++ trunk/bugzilla-2.18/debian/bugzilla.postinst	2005-04-22 11:46:24 UTC (rev 67)
@@ -58,17 +58,26 @@
 	if  [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.18; then
 		debug "Upgrading $2 "	
 		params_216="/var/lib/bugzilla/data/params"
+		
+		# the 2.16 params file is found, move it for an upgrade...
 		if [ -f $params_216 ]; then
 			debug "2.16 params file found, moving it"
+			# We are upgrading from 2.16, then $params_218_dest is only our 
+			# package's version, we can safely remove it and use the old 2.16 file
 			replace_file $params_216 $params_218_dest
+		
+		# Strange, we upgrade but we don't find any 2.16 file...
+		# using the default one
+		else 
+			replace_file $params_218_src $params_218_dest 
 		fi
+
+	# Here we don't upgrade from lower than 2.18, then we can put safely 
+	# our params file
+	else 
+		replace_file $params_218_src $params_218_dest 
 	fi
 
-	# Now we try to put our package's version of the params file
-	# We use ucf here if there is yet a file 
-	# Here, user should keep his 2.16 version if needed, the checksetup
-	# run will upgrade it to the new format.
-	replace_file $params_218_src $params_218_dest 
 
 	# Debconf is needed here for the postinst-db.pl script
 	. /usr/share/debconf/confmodule

Modified: trunk/bugzilla-2.18/debian/bugzilla.templates
===================================================================
--- trunk/bugzilla-2.18/debian/bugzilla.templates	2005-04-22 10:48:04 UTC (rev 66)
+++ trunk/bugzilla-2.18/debian/bugzilla.templates	2005-04-22 11:46:24 UTC (rev 67)
@@ -145,3 +145,8 @@
  .
  Choosing "Later" means that you don't have yet a MySQL server up
  for Bugzilla. This choice will abort the installation process.
+
+Template: bugzilla/bugzilla_upgrade_note
+Type: note
+_Description: Upgrade of the "params" file 
+