Mercurial > gub
changeset 5423:67c805b02d58
Fix system::[gcc]' stamp file. Fixes and robustifies --fresh.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Mon, 27 Jul 2009 12:15:37 +0200 |
parents | c2e391c0b5ed |
children | 6faea0f46af8 |
files | bin/gub gub/build.py gub/system.py |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/gub Mon Jul 27 12:13:53 2009 +0200 +++ b/bin/gub Mon Jul 27 12:15:37 2009 +0200 @@ -219,12 +219,11 @@ logging.info ('dependencies[%(platform)s]: %(dep_str)s\n' % locals ()) if options.fresh: - try: - for spec in list (specs.values()): - logging.action ('Removing status file') - os.unlink (spec.get_stamp_file ()) - except OSError: - pass + for spec in list (specs.values()): + status = spec.get_stamp_file () + if os.path.exists (status): + logging.info ('Removing status file: %(status)') + os.unlink (status) # TODO: figure out how to patch src_package from # stages. Simpleminded solution does not work
--- a/gub/build.py Mon Jul 27 12:13:53 2009 +0200 +++ b/gub/build.py Mon Jul 27 12:15:37 2009 +0200 @@ -53,6 +53,8 @@ @context.subst_method def stamp_file (self): return '%(statusdir)s/%(name)s-%(version)s-%(source_checksum)s' + def get_stamp_file (self): + return self.expand ('%(stamp_file)s') def apply_patch (self, patch, strip_components=1): name, parameters = misc.dissect_url (patch) strip = str (strip_components) @@ -340,9 +342,6 @@ def cache_file (self): return '%(builddir)s/config.cache' - def get_stamp_file (self): - return self.expand ('%(stamp_file)s') - def get_done (self): done = [] if os.path.exists (self.get_stamp_file ()):
--- a/gub/system.py Mon Jul 27 12:13:53 2009 +0200 +++ b/gub/system.py Mon Jul 27 12:15:37 2009 +0200 @@ -20,6 +20,8 @@ self._name, self._version = (self._created_name + '-').split ('-')[:2] def download (self): pass + def get_stamp_file (self): + return self.expand ('%(stamp_file)s') def stages (self): return ['configure'] def required (self):