changeset 3439:705140872d8a

Remove except: hack for settings to gub again.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Sat, 05 May 2007 11:46:16 +0200
parents 2138f041b468
children 5e013063eeaf
files bin/gub bin/installer-builder gub/gubb.py gub/settings.py
diffstat 4 files changed, 16 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/bin/gub	Sat May 05 11:45:38 2007 +0200
+++ b/bin/gub	Sat May 05 11:46:16 2007 +0200
@@ -213,6 +213,12 @@
                                  + '\n')
     return status
 
+def urg_add_more_settings_for_gub (settings, options):
+    settings.build_source = options.build_source
+    settings.lilypond_versions = options.lilypond_versions
+    settings.cpu_count = options.cpu_count
+    settings.set_distcc_hosts (options)
+
 def main ():
     cli_parser = get_cli_parser ()
     (options, files) = cli_parser.parse_args ()
@@ -223,6 +229,7 @@
         sys.exit (2)
 
     settings = gub.settings.Settings (options)
+    urg_add_more_settings_for_gub (settings, options)
 
     if options.inspect_key:
         inspect (settings, files)
--- a/bin/installer-builder	Sat May 05 11:45:38 2007 +0200
+++ b/bin/installer-builder	Sat May 05 11:46:16 2007 +0200
@@ -213,8 +213,6 @@
     (options, commands)  = parse_command_line ()
 
     settings = gub.settings.Settings (options)
-
-    settings.set_branches (options.branches)
     for s in options.settings:
         (k, v) = tuple (s.split ('='))
         if settings.__dict__.has_key (k):
--- a/gub/gubb.py	Sat May 05 11:45:38 2007 +0200
+++ b/gub/gubb.py	Sat May 05 11:46:16 2007 +0200
@@ -838,11 +838,13 @@
                 settings.specdir):
         file_name = dir + '/' + file_base
         if os.path.exists (file_name):
-            klass = get_class_from_spec_file (settings, file_name, name)
-            if klass:
-                import md5
-                checksum = md5.md5 (open (file_name).read ()).hexdigest ()
-                break
+            if not klass:
+                klass = get_class_from_spec_file (settings, file_name, name)
+            import md5
+            # FIXME: pretty lame, checksum based on all matching
+            # specs found, eg
+            # linux-x86/cross/binutils, linux/cross/binutils, cross/binutils
+            checksum += md5.md5 (open (file_name).read ()).hexdigest ()
 
     if not klass:
         print 'NO SPEC for', name
--- a/gub/settings.py	Sat May 05 11:45:38 2007 +0200
+++ b/gub/settings.py	Sat May 05 11:46:16 2007 +0200
@@ -42,16 +42,8 @@
         elif self.platform == 'mingw':
             self.target_gcc_flags = '-mwindows -mms-bitfields'
 
-        try:
-            self.options = options ##ugh
-            self.set_branches (options.branches)
-            self.build_source = options.build_source
-            self.lilypond_versions = options.lilypond_versions
-            self.cpu_count = options.cpu_count
-            self.set_distcc_hosts (options)
-        except:
-            pass
-
+        self.set_branches (options.branches)
+        self.options = options ##ugh
         self.verbose = self.options.verbose
         self.os = re.sub ('[-0-9].*', '', self.platform)