mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Add options log_info.
Provide a log_info method for the options class to log the command line and the python version string.
This commit is contained in:
parent
a4937d8585
commit
348e4983df
@ -35,6 +35,8 @@ import macros
|
|||||||
import path
|
import path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import version
|
||||||
|
|
||||||
basepath = 'sb'
|
basepath = 'sb'
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -460,6 +462,10 @@ class command_line:
|
|||||||
def download_disabled(self):
|
def download_disabled(self):
|
||||||
return self.opts['no-download'] != '0'
|
return self.opts['no-download'] != '0'
|
||||||
|
|
||||||
|
def log_info(self):
|
||||||
|
log.output(' Command Line: %s' % (' '.join(self.argv)))
|
||||||
|
log.output(' Python: %s' % (sys.version.replace('\n', '')))
|
||||||
|
|
||||||
def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
|
def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
|
||||||
"""
|
"""
|
||||||
Copy the defaults, get the host specific values and merge them overriding
|
Copy the defaults, get the host specific values and merge them overriding
|
||||||
@ -526,17 +532,17 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
|
|||||||
o.process()
|
o.process()
|
||||||
o.post_process()
|
o.post_process()
|
||||||
|
|
||||||
log.notice(' '.join(args))
|
|
||||||
|
|
||||||
return o
|
return o
|
||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
try:
|
try:
|
||||||
_opts = load(args = args, defaults = 'defaults.mc')
|
_opts = load(args = args, defaults = 'defaults.mc')
|
||||||
print 'Options:'
|
log.notice('RTEMS Source Builder - Defaults, v%s' % (version.str()))
|
||||||
print _opts
|
_opts.log_info()
|
||||||
print 'Defaults:'
|
log.notice('Options:')
|
||||||
print _opts.defaults
|
log.notice(str(_opts))
|
||||||
|
log.notice('Defaults:')
|
||||||
|
log.notice(str(_opts.defaults))
|
||||||
except error.general, gerr:
|
except error.general, gerr:
|
||||||
print gerr
|
print gerr
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user