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

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


commit 06903eea75b992af3feda052e0717426ee94f26d
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 f4dbd3b..63c4863 100644
--- a/php.spec
+++ b/php.spec
@@ -2744,6 +2744,10 @@ done
 %triggerpostun common -- %{name}-common < 4:5.5.20-2, php-common < 4:5.5.20-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/0ee315f8f456bf200d7d7ab455b52cef9e007239



More information about the pld-cvs-commit mailing list