From: Dragan Dosen <bane@nekkar.carnet.hr>
Date: Tue, 3 Mar 2009 01:04:55 +0000 (+0100)
Subject:   Prikaz liste razlicitih ekstenzija izmedju PHP5 i PHP4,
X-Git-Tag: v5.3.3+3~6
X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=11cfc731345934540f3af0e2ff47534baadaef1e;p=php5-cn.git

  Prikaz liste razlicitih ekstenzija izmedju PHP5 i PHP4,
  bez obzira radi li se nova instalacija, upgrade ili se
  pokrenuo dpkg-reconfigure.
---

diff --git a/debian/postinst b/debian/postinst
index da2a128..5554f5d 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -137,7 +137,9 @@ for php5ext in $EXTENSIONS; do
 
         	if [ -f "$ini_file" ]; then
 
-			cp_echo "CN: Removing $php5ext extension from file $ini_file"
+			if egrep -q "$php5ext_re" "$ini_file"; then
+				cp_echo "CN: Removing $php5ext extension from file $ini_file"
+			fi
 
 			cp_check_and_sed "$php5ext_re" \
 				"/$php5ext_re/d" \
@@ -256,10 +258,7 @@ done
 
 # Compare active PHP5 extensions with PHP4 ones, if PHP4 configuration still exists.
 #
-db_fget php5-cn/extensions seen
-if [ "$RET" != "true" ]; then
-
-    if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then
+if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then
 
         phpext_re='^[[:space:]]*extension[[:space:]]*=[[:space:]]*["]{0,1}(.*)\.so["]{0,1}'
 
@@ -293,7 +292,6 @@ if [ "$RET" != "true" ]; then
             db_input critical php5-cn/extensions || true
             db_go || true
         fi
-    fi
 fi