summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-07-21 10:22:03 +1000
committerChris Johns <chrisj@rtems.org>2013-07-21 10:22:03 +1000
commit01b28157ff81113a364682f62f971f1e816dd18f (patch)
treeefe8375e6b22da6ee397d811989b79e773490d8d
parentCONFIG: PR 2127 - Build fails on Linux. (diff)
downloadrtems-source-builder-01b28157ff81113a364682f62f971f1e816dd18f.tar.bz2
SB: Fix internal build and mailing. Output errors to the log.
-rw-r--r--source-builder/sb/setbuilder.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index 00bcec3..7986192 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -81,9 +81,8 @@ class buildset:
self.mail_report += text
def copy(self, src, dst):
- if self.opts.dry_run():
- log.output('copy: %s => %s' % (path.host(src), path.host(dst)))
- else:
+ log.output('copy: %s => %s' % (path.host(src), path.host(dst)))
+ if not self.opts.dry_run():
if not os.path.isdir(path.host(src)):
raise error.general('copying tree: no source directory: %s' % \
(path.host(src)))
@@ -135,7 +134,8 @@ class buildset:
_build.mkdir(outpath)
r.write(outname)
del r
- if _build.opts.get_arg('--mail'):
+ if not _build.macros.get('%{_disable_reporting}') \
+ and _build.opts.get_arg('--mail'):
r = reports.report('text', self.configs, _build.opts, _build.macros)
r.setup()
r.introduction(_build.config.file_name())
@@ -331,6 +331,8 @@ class buildset:
log.trace('_bset: %s' % ('-' * 80))
b = build.build(configs[s], self.opts.get_arg('--pkg-tar-files'),
opts, macros)
+ if b.macros.get('%{_disable_reporting}'):
+ mail_report = False
if deps is None:
self.build_package(configs[s], b)
if s == len(configs) - 1:
@@ -351,7 +353,7 @@ class buildset:
self.write_mail_header(str(log.default))
self.write_mail_header('- ' * 40)
if self.opts.keep_going():
- print gerr
+ log.notice(str(gerr))
if self.opts.always_clean():
builds += [b]
else:
@@ -455,11 +457,11 @@ def run():
c += 1
print 'dep[%d]: %s' % (c, d)
except error.general, gerr:
- print gerr
+ log.notice(str(gerr))
print >> sys.stderr, 'Build FAILED'
sys.exit(1)
except error.internal, ierr:
- print ierr
+ log.notice(str(ierr))
sys.exit(1)
except error.exit, eerr:
pass