SPECS: php.spec - use %posttrans to minimize apache restarts (as r...

glen glen at pld-linux.org
Tue Aug 16 01:18:04 CEST 2005


Author: glen                         Date: Mon Aug 15 23:18:04 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %posttrans to minimize apache restarts (as rpm never promised
  ordering between install and erase, what in fact may change that
  ordering in order to run erasures in parallel with installs.)

---- Files affected:
SPECS:
   php.spec (1.460 -> 1.461) 

---- Diffs:

================================================================
Index: SPECS/php.spec
diff -u SPECS/php.spec:1.460 SPECS/php.spec:1.461
--- SPECS/php.spec:1.460	Mon Aug 15 18:39:15 2005
+++ SPECS/php.spec	Tue Aug 16 01:17:57 2005
@@ -88,7 +88,7 @@
 Summary(uk):	PHP ÷ĹŇÓŚ§ 5 - ÍĎ×Á ĐŇĹĐŇĎĂĹÓŐ×ÁÎÎŃ HTML-ĆÁĘĚŚ×, ×ÉËĎÎŐ×ÁÎÁ ÎÁ ÓĹŇ×ĹŇŚ
 Name:		php
 Version:	5.0.4
-Release:	9.21%{?with_hardening:hardened}
+Release:	9.23%{?with_hardening:hardened}
 Epoch:		4
 Group:		Libraries
 License:	PHP
@@ -378,6 +378,8 @@
 Provides:	%{name}-session = %{epoch}:%{version}-%{release}
 Provides:	php-common(apache-modules-api) = %{apache_modules_api}
 Obsoletes:	php-session < 3:4.2.1-2
+# for the posttrans scriptlet, conflicts because in vserver enviroinment rpm package is not installed.
+Conflicts:	rpm < 4.4.2-0.2
 
 %description common
 Common files needed by both apache module and CGI.
@@ -1837,13 +1839,19 @@
 fi
 
 %post	common -p /sbin/ldconfig
-%postun	common
-/sbin/ldconfig
-# extension_post here is all correct.
-%extension_post
+%postun	common -p /sbin/ldconfig
+
+%posttrans common
+# minimizing apache restarts logics. we restart webserver:
+#
+# 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
+# 2. first install of extension (post: $1 = 1)
+# 2. uninstall of extension (postun: $1 == 0)
+#
+# the strict internal deps between extensions (and apache modules) and
+# common package are very important for all this to work.
 
-# compensate missing restart of earlier -common package.
-%triggerpostun common -- %{name}-common < 4:5.0.4-9.1
+# restart webserver at the end of transaction
 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
 
@@ -2914,6 +2922,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.461  2005/08/15 23:17:57  glen
+- use %posttrans to minimize apache restarts (as rpm never promised
+  ordering between install and erase, what in fact may change that
+  ordering in order to run erasures in parallel with installs.)
+
 Revision 1.460  2005/08/15 16:39:15  glen
 - port changes fron php4.spec:
   - add conf.d support
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php.spec?r1=1.460&r2=1.461&f=u




More information about the pld-cvs-commit mailing list