mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
SB: Fix internal build and mailing. Output errors to the log.
This commit is contained in:
parent
6d32fe7eb0
commit
01b28157ff
@ -81,9 +81,8 @@ class buildset:
|
|||||||
self.mail_report += text
|
self.mail_report += text
|
||||||
|
|
||||||
def copy(self, src, dst):
|
def copy(self, src, dst):
|
||||||
if self.opts.dry_run():
|
log.output('copy: %s => %s' % (path.host(src), path.host(dst)))
|
||||||
log.output('copy: %s => %s' % (path.host(src), path.host(dst)))
|
if not self.opts.dry_run():
|
||||||
else:
|
|
||||||
if not os.path.isdir(path.host(src)):
|
if not os.path.isdir(path.host(src)):
|
||||||
raise error.general('copying tree: no source directory: %s' % \
|
raise error.general('copying tree: no source directory: %s' % \
|
||||||
(path.host(src)))
|
(path.host(src)))
|
||||||
@ -135,7 +134,8 @@ class buildset:
|
|||||||
_build.mkdir(outpath)
|
_build.mkdir(outpath)
|
||||||
r.write(outname)
|
r.write(outname)
|
||||||
del r
|
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 = reports.report('text', self.configs, _build.opts, _build.macros)
|
||||||
r.setup()
|
r.setup()
|
||||||
r.introduction(_build.config.file_name())
|
r.introduction(_build.config.file_name())
|
||||||
@ -331,6 +331,8 @@ class buildset:
|
|||||||
log.trace('_bset: %s' % ('-' * 80))
|
log.trace('_bset: %s' % ('-' * 80))
|
||||||
b = build.build(configs[s], self.opts.get_arg('--pkg-tar-files'),
|
b = build.build(configs[s], self.opts.get_arg('--pkg-tar-files'),
|
||||||
opts, macros)
|
opts, macros)
|
||||||
|
if b.macros.get('%{_disable_reporting}'):
|
||||||
|
mail_report = False
|
||||||
if deps is None:
|
if deps is None:
|
||||||
self.build_package(configs[s], b)
|
self.build_package(configs[s], b)
|
||||||
if s == len(configs) - 1:
|
if s == len(configs) - 1:
|
||||||
@ -351,7 +353,7 @@ class buildset:
|
|||||||
self.write_mail_header(str(log.default))
|
self.write_mail_header(str(log.default))
|
||||||
self.write_mail_header('- ' * 40)
|
self.write_mail_header('- ' * 40)
|
||||||
if self.opts.keep_going():
|
if self.opts.keep_going():
|
||||||
print gerr
|
log.notice(str(gerr))
|
||||||
if self.opts.always_clean():
|
if self.opts.always_clean():
|
||||||
builds += [b]
|
builds += [b]
|
||||||
else:
|
else:
|
||||||
@ -455,11 +457,11 @@ def run():
|
|||||||
c += 1
|
c += 1
|
||||||
print 'dep[%d]: %s' % (c, d)
|
print 'dep[%d]: %s' % (c, d)
|
||||||
except error.general, gerr:
|
except error.general, gerr:
|
||||||
print gerr
|
log.notice(str(gerr))
|
||||||
print >> sys.stderr, 'Build FAILED'
|
print >> sys.stderr, 'Build FAILED'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except error.internal, ierr:
|
except error.internal, ierr:
|
||||||
print ierr
|
log.notice(str(ierr))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except error.exit, eerr:
|
except error.exit, eerr:
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user