changeset 5162:343598807268

Remove status after succesful build. This fixes broken half-rebuilds. Also add sanity check to prevent junking precious packages.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Tue, 17 Feb 2009 16:19:58 +0100
parents 0ea349a9dcea
children c36df4781136
files gub/buildrunner.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gub/buildrunner.py	Tue Feb 17 16:18:50 2009 +0100
+++ b/gub/buildrunner.py	Tue Feb 17 16:19:58 2009 +0100
@@ -30,6 +30,7 @@
 from gub import build
 from gub import misc
 from gub import gup
+from gub import loggedos
 from gub import logging
 from gub import runner
 import gub.settings   # otherwise naming conflict with settings local vars.
@@ -222,7 +223,13 @@
             spec.build (self.options, skip)
             spec.connect_command_runner (None)
             deferred_runner.execute_deferred_commands ()
+            if len (self.checksums[spec_name].split ('\n')) < 5:
+                # Sanity check.  This can't be right.  Do not
+                # overwrite precious [possibly correct] checksum.
+                raise Exception ('BROKEN CHECKSUM:' + self.checksums[spec_name])
             open (spec.expand ('%(checksum_file)s'), 'w').write (self.checksums[spec_name])
+            #spec.set_done ('')
+            loggedos.system (logging.default_logger, spec.expand ('rm -f %(stamp_file)s'))
         logger.write_log (spec.stage_message ('pkg_install'), 'stage')
         # Ugh, pkg_install should be stage
         if spec.install_after_build: