[packages/php/PHP_5_4] browscap trigger: disable browscap if file it points to does not exist
glen
glen at pld-linux.org
Thu Feb 19 11:17:30 CET 2015
commit a7d82a829c1a6b957b115eefe44d7aa7e99d004d
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 a82138a..766aa43 100644
--- a/php.spec
+++ b/php.spec
@@ -2602,6 +2602,10 @@ fi
%triggerpostun common -- %{name}-common < 4:5.4.36-2, php-common < 4:5.4.36-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/a7d82a829c1a6b957b115eefe44d7aa7e99d004d
More information about the pld-cvs-commit
mailing list