libtool-commit
[Top][All Lists]
Advanced

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

Re: Testing (with attachment this time!)


From: Gary V. Vaughan
Subject: Re: Testing (with attachment this time!)
Date: Thu, 14 Oct 2004 16:58:49 +0100
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Hi Bob,

Bob Friesenhahn wrote:
> If I run mailnotify using bash, it gets farther, but then it fails
> because it tries to invoke sendmail from my PATH rather than the one at
> /usr/lib/sendmail:
> 
> + from_name=Bob Friesenhahn
> ++ echo 'Bob Friesenhahn <address@hidden>'
> ++ sed 's,^.*<\(.*\)>.*$,\1,'
> + address@hidden
> + SENDMAIL=sendmail
> + which sendmail
> + SENDMAIL=sendmail
> + break
> + func_verbose 'Delivering mail, please wait...'
> + false
> + :
> + test -n 'Bob Friesenhahn'
> + sendmail -F 'Bob Friesenhahn' -f address@hidden
> address@hidden
> config/mailnotify: sendmail: command not found
> + test 127 -eq 0
> + func_fatal_error 'Mail delivery failed, draft mail is in
> /tmp/mailnotify27299-16800.15787'
> + func_error 'Mail delivery failed, draft mail is in
> /tmp/mailnotify27299-16800.15787'
> + echo 'mailnotify: Mail delivery failed, draft mail is in
> /tmp/mailnotify27299-16800.15787'
> mailnotify: Mail delivery failed, draft mail is in
> /tmp/mailnotify27299-16800.15787
> + exit 1
> blade:src/gnu/libtool-branch-2-0% ls /usr/lib/sendmail
> /usr/lib/sendmail*

Okay, thanks.  Does the attached patch work for you?
(don't forget to run `reconfdirs=. ./bootstrap' to regenerate
config/mailnotify after applying the patch).

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: PGP signature

* looking for address@hidden/libtool--release--2.0--patch-28 to compare with
* comparing to address@hidden/libtool--release--2.0--patch-28
M  config/mailnotify.m4sh

* modified files

--- orig/config/mailnotify.m4sh
+++ mod/config/mailnotify.m4sh
@@ -60,6 +60,7 @@
 
 : ${TMPDIR=/tmp}
 : ${HOST=`hostname`}
+: ${SENDMAIL=sendmail}
 
 PROGRAM=mailnotify
 
@@ -285,13 +286,17 @@
     from_name=`echo "$my_from" | sed 's, *<.*> *$,,;s,",,g'`
     from_addr=`echo "$my_from" | sed "$sed_mail_address"`
 
-    SENDMAIL=sendmail
-    for try_sendmail in sendmail /usr/lib/sendmail /usr/sbin/sendmail; do
-       if which $try_sendmail >/dev/null 2>&1; then
-           SENDMAIL=$try_sendmail
+    save_IFS="$IFS"
+    IFS=':'
+    for try_sendmail_dir in /usr/lib:/usr/sbin:$PATH; do
+        IFS="$save_IFS"
+       if test -x "$try_sendmail_dir/$SENDMAIL"; then
+           SENDMAIL="$try_sendmail_dir/$SENDMAIL"
            break
        fi
     done
+    IFS="$save_IFS"
+    test -x "$SENDMAIL" || func_fatal_error "sendmail executable not found"
 
     func_verbose "Delivering mail, please wait..."
     if test -n "$from_name"; then
@@ -320,8 +325,10 @@
   trap 'rm -f "$fname"; exit 1' 1 2 15
 
   destination=""
-  for to;
+  for to in : ${1+"$@"}
   do
+      test "X$to" = X: && continue
+
       case $destination in
          "") destination="$to" ;;
           *)  destination="$destination, $to" ;;
@@ -337,7 +344,10 @@
 
   if test -z "$outputfile"; then
       destination=""
-      for to; do
+      for to in : ${1+"$@"}
+      do
+          test "X$to" = X: && continue
+
           to_addr=`echo "$to" | sed "$sed_mail_address"`
          test -n "$to_addr" || to_addr="$to"
          destination="$destination $to_addr"



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]