libtool-patches
[Top][All Lists]
Advanced

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

FYI: HEAD: libtoolize --ltdl non-failure


From: Ralf Wildenhues
Subject: FYI: HEAD: libtoolize --ltdl non-failure
Date: Sun, 4 Dec 2005 15:34:05 +0100
User-agent: Mutt/1.5.11

Hi Gary,

Somewhat older:

* Gary V. Vaughan wrote on Thu, Nov 17, 2005 at 05:30:51PM CET:
> Ralf Wildenhues wrote:
> >>It's a bug when
> >> libtoolize --ltdl
> >>succeeds although it did not find the libltdl source files.

> There is code in func_copy_cb that notices missing files:
> 
>     test -f "$my_srcdir/$my_file" || \
>       { func_error "\`$my_file' not found in \`$my_srcdir'"; return; }

That's way too late: for nonexistent files, it does not get there, at
least not every time.

> I wonder whether the right thing to do in general is add to func_error()
> a line:
> 
>     exit_status=1
> 
> Before committing such a change, I think we need to look at all the
> call sites for func_error to make sure this change in semantics won't
> break anything.

I rather went the way of putting func_fatal_error's everywhere needed
to make it barf as loud as possible, in a number of situations.  It's
pretty safe since we do not do cruft like `cd $srcdir && ls *` any more
(except in func_copy_all_files, which is actually unused and will be
deleted ;-).

I have applied the patch below to CVS HEAD.

Cheers,
Ralf

        * libtoolize.m4sh (func_copy_cb, func_copy_some_files)
        (func_serial_update, func_keyword_update): Fail immediately
        if some file we may install does not exist.
        Reported by Troy Benjegerdes <address@hidden>.

Index: libtoolize.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libtoolize.m4sh,v
retrieving revision 1.48
diff -u -r1.48 libtoolize.m4sh
--- libtoolize.m4sh     3 Dec 2005 08:49:48 -0000       1.48
+++ libtoolize.m4sh     4 Dec 2005 14:12:53 -0000
@@ -238,8 +238,8 @@
     copy_return_status=1
 
     # Libtool is probably misinstalled if this happens:
-    test -f "$my_srcdir/$my_file" || \
-      { func_error "\`$my_file' not found in \`$my_srcdir'"; return; }
+    test -f "$my_srcdir/$my_file" || 
+        func_fatal_error "\`$my_file' not found in \`$my_srcdir'"
 
     case $opt_verbose in
       false) my_copy_msg="file \`$my_destdir/$my_file'"     ;;
@@ -350,8 +360,7 @@
          fi
         fi
       else
-        # Not a regular file
-        continue
+       func_fatal_error "\`$my_filename' not found in \`$my_srcdir'"
       fi
 
       $my_copy_cb "$my_filename" "$my_srcdir" "$my_destdir"
@@ -712,10 +738,7 @@
     my_srcfile="$my_srcdir/$my_filename"
     my_destfile="$my_destdir/$my_filename"
 
-    test -f "$my_srcfile" || {
-      func_error "\`$my_srcfile' does not exist."
-      return
-    }
+    test -f "$my_srcfile" || func_fatal_error "\`$my_srcfile' does not exist."
 
     if test -f "$my_destfile"; then
       my_src_serial=`func_serial "$my_srcfile" "$my_macro_regex"`
@@ -786,10 +809,7 @@
 
     my_keyword_update_p=:
 
-    test -f "$my_srcfile" || {
-      func_error "\`$my_srcfile' does not exist."
-      return
-    }
+    test -f "$my_srcfile" || func_fatal_error "\`$my_srcfile' does not exist."
 
     if test -f "$my_destfile"; then
       my_src_serial=`$SED -e "$my_sed_script" "$my_srcfile"`




reply via email to

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