changeset 2503:30ef4481141c

Only try to update libtool scripts if package is using libtool. Fixes bootstrap.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Wed, 25 Oct 2006 07:13:47 +0100
parents 424869e42e7a
children 118f345daf44
files lib/gub.py
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lib/gub.py	Wed Oct 25 06:15:43 2006 +0100
+++ b/lib/gub.py	Wed Oct 25 07:13:47 2006 +0100
@@ -350,16 +350,16 @@
                        file, must_succeed=True)
         
     def update_libtool (self):
-        new_lt = self.expand ('%(system_root)s/usr/bin/libtool')
-
-        if os.path.exists (new_lt):
-            for lt in self.locate_files ('%(builddir)s', 'libtool'):
-                self.system ('cp %(new_lt)s %(lt)s', locals ())
-                self.kill_libtool_installation_test (lt)
-                self.system ('chmod 755  %(lt)s', locals ())
-        else:
-            self.log_command ("Cannot update libtool without libtools in %(system_root)s/usr/bin/.")
-            raise 'barf'
+        lst = self.locate_files ('%(builddir)s', 'libtool')
+        if lst:
+            new = self.expand ('%(system_root)s/usr/bin/libtool')
+            if not os.path.exists (newt):
+                self.log_command ("Cannot update libtool: no such file: %(new)s" % locals ())
+                raise 'barf'
+            for i in lst:
+                self.system ('cp %(newt)s %(i)s', locals ())
+                self.kill_libtool_installation_test (i)
+                self.system ('chmod 755  %(i)s', locals ())
 
     def install (self):
         self.system ('''