[evolution-patches] About the grep -q issue on Solaris.



Dear harish,


While building evolution trunk on Solaris 10, I found that the grep in
configure.in script used with the -q option which is not supportted by
Solaris grep.

Please see part of the result of grep(1) manual page.

       -s, --no-messages  

       Suppress  error  messages  about  nonexistent  or unreadable
files.  Portability note: unlike GNU grep, traditional grep did not
conform to POSIX.2, because traditional grep lacked a -q option and its
-s option behaved like GNU grep's -q option.  Shell  scripts  intended
to  be portable to traditional grep should avoid both -q and -s and
should redirect output to /dev/null instead.


As a result, when people configures with audio-inline, new-mail-notify
and exchange-operations plugins which 'grep -q' takes effect on, it can
not find the proper pkgconfig *.pc files, thus weird compiling errors
occur.


Attachment is my patch against this bug. I simply changed the -q option
to a redirection to /dev/null.


Yours,
Mengjie
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1522
diff -u -p -r1.1522 ChangeLog
--- ChangeLog	28 Aug 2005 17:11:15 -0000	1.1522
+++ ChangeLog	5 Sep 2005 13:36:25 -0000
@@ -1,3 +1,7 @@
+2005-09-05  Mengjie Yu  <meng-jie yu sun com>
+
+	* configure.in:grep on Solaris doesn't support -q, use > /dev/null instead.
+
 2005-08-28  Harish Krishnaswamy <kharish novell com>
 
 	* configure.in : Turn stable release bit on. Set
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.845
diff -u -p -r1.845 configure.in
--- configure.in	28 Aug 2005 17:11:15 -0000	1.845
+++ configure.in	5 Sep 2005 13:36:25 -0000
@@ -1458,7 +1458,7 @@ AC_SUBST(plugins_base)
 AC_SUBST(plugins_standard)
 AC_SUBST(plugins_experimental)
 
-if echo ${plugins_enabled} | grep -q "audio-inline"
+if echo ${plugins_enabled} | grep "audio-inline" > /dev/null
 then
 	if ${PKG_CONFIG} --exists gstreamer-0.8
 	then
@@ -1475,7 +1475,7 @@ then
 	fi
 fi
 
-if echo ${plugins_enabled} | grep -q "new-mail-notify" ; then
+if echo ${plugins_enabled} | grep "new-mail-notify" > /dev/null ; then
 	if ${PKG_CONFIG} --exists dbus-glib-1 ; then
 		dnl **************************************************
 		dnl * New Mail Notify plugin
@@ -1495,7 +1495,7 @@ if echo ${plugins_enabled} | grep -q "ne
 	fi
 fi
 
-if echo ${plugins_enabled} | grep -q "exchange-operations" ; then
+if echo ${plugins_enabled} | grep "exchange-operations" > /dev/null ; then
 	if ${PKG_CONFIG} --exists libexchange-storage-$EDS_PACKAGE ; then
 		dnl **************************************************
 		dnl * Exchange Operations plugin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]