diff options
author | Chris Johns <chrisj@rtems.org> | 2014-05-08 02:58:14 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-05-08 13:20:29 +1000 |
commit | 74da24cb61ef4478ca499c029a732cdba13ee668 (patch) | |
tree | f8eddd16894d6464ec036a4be4a0054b45be0ada /source-builder/sb/options.py | |
parent | config: Fix the host and build options for Canadian cross builds. (diff) | |
download | rtems-source-builder-74da24cb61ef4478ca499c029a732cdba13ee668.tar.bz2 |
sb: Generate an error report on an error.
Generate an error report users can send to the mailing list with
error details.
Diffstat (limited to 'source-builder/sb/options.py')
-rw-r--r-- | source-builder/sb/options.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py index 2d5c04d..af64080 100644 --- a/source-builder/sb/options.py +++ b/source-builder/sb/options.py @@ -303,6 +303,10 @@ class command_line: repo_valid = '1' repo_head = repo.head() repo_clean = not repo.dirty() + repo_remotes = '%{nil}' + remotes = repo.remotes() + if 'origin' in remotes: + repo_remotes = '%s/origin' % (remotes['origin']['url']) repo_id = repo_head if not repo_clean: repo_id += '-modified' @@ -311,11 +315,13 @@ class command_line: repo_valid = '0' repo_head = '%{nil}' repo_clean = '%{nil}' + repo_remotes = '%{nil}' repo_id = 'no-repo' repo_mail = None self.defaults['_sbgit_valid'] = repo_valid self.defaults['_sbgit_head'] = repo_head self.defaults['_sbgit_clean'] = str(repo_clean) + self.defaults['_sbgit_remotes'] = str(repo_remotes) self.defaults['_sbgit_id'] = repo_id if repo_mail is not None: self.defaults['_sbgit_mail'] = repo_mail @@ -462,9 +468,13 @@ class command_line: def download_disabled(self): return self.opts['no-download'] != '0' + def info(self): + s = ' Command Line: %s%s' % (' '.join(self.argv), os.linesep) + s += ' Python: %s' % (sys.version.replace('\n', '')) + return s + def log_info(self): - log.output(' Command Line: %s' % (' '.join(self.argv))) - log.output(' Python: %s' % (sys.version.replace('\n', ''))) + log.output(self.info()) def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'): """ |