[packages/php/PHP_5_6] browscap trigger: disable browscap if file it points to does not exist

glen glen at pld-linux.org
Thu Feb 19 11:17:45 CET 2015


commit 1a0f4cce58129d1fd47f36e41fd415cc783655ce
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Feb 19 12:16:42 2015 +0200

    browscap trigger: disable browscap if file it points to does not exist

 php.spec | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/php.spec b/php.spec
index 7fe36d1..441df91 100644
--- a/php.spec
+++ b/php.spec
@@ -2826,6 +2826,10 @@ done
 %triggerpostun common -- %{name}-common < 4:5.6.4-2, php-common < 4:5.6.4-2
 # switch to browscap package if the ini file has original value
 %{__sed} -i -e 's#%{_sysconfdir}/browscap.ini#/usr/share/browscap/php_browscap.ini#' %{_sysconfdir}/php.ini
+# disable browscap, if optional package not present
+if [ ! -e /usr/share/browscap/php_browscap.ini ]; then
+	%{__sed} -i -e 's#^browscap = /usr/share/browscap/php_browscap.ini#;&#' %{_sysconfdir}/php.ini
+fi
 
 # common macros called at extension post/postun scriptlet
 %define	extension_scripts() \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/1a0f4cce58129d1fd47f36e41fd415cc783655ce



More information about the pld-cvs-commit mailing list