Fix for #336853
"Julio M. Merino Vidal" <[email protected]>
| Newsgroups | gmane.comp.gnome.evolution.patches |
|---|---|
| Message-ID | <[email protected]> |
Hello, bug 336853 describes the problem shown below. I'm attaching the proposed fix, which is also attached to the bug. I remember that I was once told to send patches for evolution to this list aside from the bug report, so hence that's what I'm doing. Is that correct? The configure.in script in evolution has a check to look for a kill-by-name utility, which resolves to either pkill or killall. However, the check is incomplete because it assumes that only SunOS has pkill and that all other systems should have killall. This results in the configure script not detecting pkill in NetBSD, which is the only available utility (killall is not present). This probably affects other systems. The check in the script should look for pkill and killall by using AC_PATH_PROGS so that the first one found is used, no matter in which operating system the check was ran. This also avois using the which(1) command which is not guaranteed to work in all cases (it may not look in all path components, thus leading to a false result). The attached patch fixes this issue. -- Julio M. Merino Vidal <[email protected]> The Julipedia - http://julipedia.blogspot.com/ _______________________________________________ Evolution-patches mailing list [email protected] http://mail.gnome.org/mailman/listinfo/evolution-patches
patch.diff
(text/x-patch, 1.8 KB)
Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/ChangeLog,v retrieving revision 1.1580 diff -u -p -r1.1580 ChangeLog --- ChangeLog 27 Mar 2006 03:44:15 -0000 1.1580 +++ ChangeLog 1 Apr 2006 16:48:06 -0000 @@ -1,3 +1,10 @@ +2006-04-01 Julio M. Merino Vidal <[email protected]> + + * configure.in: Do not assume that only SunOS has pkill because + other systems (e.g. NetBSD) also have it. Fix the check that + looks for an utility to kill a process by name to properly detect + either pkill or killall. Fixes bug #336853. + 2006-03-27 Parthasarathi Susarla <[email protected]> * MAINTAINERS: Changing the maintainers file to reflect Index: configure.in =================================================================== RCS file: /cvs/gnome/evolution/configure.in,v retrieving revision 1.891 diff -u -p -r1.891 configure.in --- configure.in 22 Mar 2006 11:15:13 -0000 1.891 +++ configure.in 1 Apr 2006 16:48:07 -0000 @@ -975,20 +975,12 @@ dnl ***************** dnl killall or pkill? dnl ***************** -AC_MSG_CHECKING(for command to kill processes) - -if test `uname -s` = "SunOS" ; then - KILL_PROCESS_CMD="pkill"; +AC_PATH_PROGS(KILL_PROCESS_CMD, killall pkill) +if test -z "$KILL_PROCESS_CMD"; then + AC_MSG_WARN([Could not find a command to kill a process by name]) else - KILL_PROCESS_CMD="killall"; -fi - -KILL_PROCESS_CMD=`which $KILL_PROCESS_CMD` -if test -z "$KILL_PROCESS_CMD" ; then - AC_MSG_RESULT(none) -else - AC_MSG_RESULT($KILL_PROCESS_CMD) - AC_DEFINE_UNQUOTED([KILL_PROCESS_CMD], "$KILL_PROCESS_CMD", [Command to kill processes by name]) + AC_DEFINE_UNQUOTED([KILL_PROCESS_CMD], "$KILL_PROCESS_CMD", + [Command to kill processes by name]) fi dnl ******************************