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

Alexis Sukrieh sukria-guest@costa.debian.org
Fri, 22 Apr 2005 10:42:16 +0000


Author: sukria-guest
Date: 2005-04-22 10:42:16 +0000 (Fri, 22 Apr 2005)
New Revision: 65

Modified:
   trunk/bugzilla-2.18/debian/bugzilla.postinst
   trunk/bugzilla-2.18/debian/bugzilla.postrm
Log:

Postinst now handles upgrades from 2.16
Postrm purges directories and ucf entries.



Modified: trunk/bugzilla-2.18/debian/bugzilla.postinst
===================================================================
--- trunk/bugzilla-2.18/debian/bugzilla.postinst	2005-04-22 10:17:58 UTC (rev 64)
+++ trunk/bugzilla-2.18/debian/bugzilla.postinst	2005-04-22 10:42:16 UTC (rev 65)
@@ -53,17 +53,11 @@
 	# manage the upgrade before 2.18
 	# We aim here to upgrade the params file from oldest version.
 	if  [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.18; then
-		debug "Upgrading $2"	
+		debug "Upgrading $2 "	
 		params_216="/var/lib/bugzilla/data/params"
-		
-		# As we are upgrading from 2.16, we must not find
-		# a file in the 2.18 location
-		if [ ! -f $params_218_dest ]; then
-			mv $params_216 $params_218_dest
-		else
-			echo "Error in postinst: there is a file from a bugzilla 2.18 package ($params_218_dest)" >&2
-			echo "but you are upgrading from a lower version." >&2
-			exit 15
+		if [ -f $params_216 ]; then
+			debug "2.16 params file found, moving it"
+			replace_file $params_216 $params_218_dest
 		fi
 	fi
 

Modified: trunk/bugzilla-2.18/debian/bugzilla.postrm
===================================================================
--- trunk/bugzilla-2.18/debian/bugzilla.postrm	2005-04-22 10:17:58 UTC (rev 64)
+++ trunk/bugzilla-2.18/debian/bugzilla.postrm	2005-04-22 10:42:16 UTC (rev 65)
@@ -18,9 +18,9 @@
 
 case "$1" in
        purge)
-        rm -rf /var/lib/bugzilla/
-	#We should also destroy the database
-
+	ucf --purge /usr/share/bugzilla/web/data/params
+	rm -rf /usr/share/bugzilla
+	rm -rf /var/cache/bugzilla/template
        ;;
 
        remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)