def run(args):
    ec = 0
    try:
        optargs = {'--list-configs': 'List available configurations'}
        opts = options.load(args, optargs)
        log.notice('RTEMS Source Builder, Package Builder v%s' %
                   (version.str()))
        if not check.host_setup(opts):
            if not opts.force():
                raise error.general('host build environment is not set up' +
                                    ' correctly (use --force to proceed)')
            log.notice('warning: forcing build with known host setup problems')
        if opts.get_arg('--list-configs'):
            configs = get_configs(opts)
            for p in configs['paths']:
                print 'Examining: %s' % (os.path.relpath(p))
                for c in configs['files']:
                    if c.endswith('.cfg'):
                        print '    %s' % (c)
        else:
            for config_file in opts.config_files():
                b = build(config_file, True, opts)
                b.make()
                b = None
    except error.general, gerr:
        log.stderr('Build FAILED')
        ec = 1
def run(args):
    ec = 0
    try:
        optargs = { '--list-configs': 'List available configurations' }
        opts = options.load(args, optargs)
        log.notice('RTEMS Source Builder, Package Builder v%s' % (version.str()))
        if not check.host_setup(opts):
            if not opts.force():
                raise error.general('host build environment is not set up' +
                                    ' correctly (use --force to proceed)')
            log.notice('warning: forcing build with known host setup problems')
        if opts.get_arg('--list-configs'):
            configs = get_configs(opts)
            for p in configs['paths']:
                print 'Examining: %s' % (os.path.relpath(p))
                for c in configs['files']:
                    if c.endswith('.cfg'):
                        print '    %s' % (c)
        else:
            for config_file in opts.config_files():
                b = build(config_file, True, opts)
                b.make()
                b = None
    except error.general, gerr:
        log.stderr('Build FAILED')
        ec = 1
def run(args):
    ec = 0
    try:
        optargs = {"--list-configs": "List available configurations"}
        opts = options.load(args, optargs)
        log.notice("RTEMS Source Builder, Package Builder v%s" % (version.str()))
        if not check.host_setup(opts):
            if not opts.force():
                raise error.general("host build environment is not set up" + " correctly (use --force to proceed)")
            log.notice("warning: forcing build with known host setup problems")
        if opts.get_arg("--list-configs"):
            configs = get_configs(opts)
            for p in configs["paths"]:
                print "Examining: %s" % (os.path.relpath(p))
                for c in configs["files"]:
                    if c.endswith(".cfg"):
                        print "    %s" % (c)
        else:
            for config_file in opts.config_files():
                b = build(config_file, True, opts)
                b.make()
                b = None
    except error.general, gerr:
        log.stderr("Build FAILED")
        ec = 1
def run():
    import sys
    ec = 0
    setbuilder_error = False
    try:
        optargs = { '--list-configs':  'List available configurations',
                    '--list-bsets':    'List available build sets',
                    '--list-deps':     'List the dependent files.',
                    '--bset-tar-file': 'Create a build set tar file',
                    '--pkg-tar-files': 'Create package tar files',
                    '--no-report':     'Do not create a package report.',
                    '--report-format': 'The report format (text, html, asciidoc).' }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        log.notice('RTEMS Source Builder - Set Builder, %s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general('host build environment is not set up correctly')
        configs = build.get_configs(opts)
        if opts.get_arg('--list-deps'):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand('%{_prefix}')
            if opts.canadian_cross():
                opts.disable_install()

            if not opts.dry_run() and \
               not opts.canadian_cross() and \
               not opts.no_install() and \
               not path.ispathwritable(prefix):
                raise error.general('prefix is not writable: %s' % (path.host(prefix)))
            for bset in opts.params():
                setbuilder_error = True
                b = buildset(bset, configs, opts)
                b.build(deps)
                b = None
                setbuilder_error = False
        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print('dep[%d]: %s' % (c, d))
    except error.general as gerr:
        if not setbuilder_error:
            log.stderr(str(gerr))
        log.stderr('Build FAILED')
        ec = 1
    except error.internal as ierr:
        if not setbuilder_error:
            log.stderr(str(ierr))
        log.stderr('Internal Build FAILED')
        ec = 1
    except error.exit as eerr:
        pass
    except KeyboardInterrupt:
        log.notice('abort: user terminated')
        ec = 1
    sys.exit(ec)
def run():
    import sys
    ec = 0
    setbuilder_error = False
    try:
        optargs = { '--list-configs':  'List available configurations',
                    '--list-bsets':    'List available build sets',
                    '--list-deps':     'List the dependent files.',
                    '--bset-tar-file': 'Create a build set tar file',
                    '--pkg-tar-files': 'Create package tar files',
                    '--no-report':     'Do not create a package report.',
                    '--report-format': 'The report format (text, html, asciidoc).' }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        log.notice('RTEMS Source Builder - Set Builder, %s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general('host build environment is not set up correctly')
        configs = build.get_configs(opts)
        if opts.get_arg('--list-deps'):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand('%{_prefix}')
            if opts.canadian_cross():
                opts.disable_install()

            if not opts.dry_run() and \
               not opts.canadian_cross() and \
               not opts.no_install() and \
               not path.ispathwritable(prefix):
                raise error.general('prefix is not writable: %s' % (path.host(prefix)))
            for bset in opts.params():
                setbuilder_error = True
                b = buildset(bset, configs, opts)
                b.build(deps)
                b = None
                setbuilder_error = False
        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print('dep[%d]: %s' % (c, d))
    except error.general as gerr:
        if not setbuilder_error:
            log.stderr(str(gerr))
        log.stderr('Build FAILED')
        ec = 1
    except error.internal as ierr:
        if not setbuilder_error:
            log.stderr(str(ierr))
        log.stderr('Internal Build FAILED')
        ec = 1
    except error.exit as eerr:
        pass
    except KeyboardInterrupt:
        log.notice('abort: user terminated')
        ec = 1
    sys.exit(ec)
Exemple #6
0
def run(args):
    try:
        optargs = {
            '--list-bsets': 'List available build sets',
            '--list-configs': 'List available configurations',
            '--format': 'Output format (text, html, asciidoc, ini, xml)',
            '--output': 'File name to output the report'
        }
        opts = options.load(args, optargs)
        if opts.get_arg('--output') and len(opts.params()) > 1:
            raise error.general(
                '--output can only be used with a single config')
        print 'RTEMS Source Builder, Reporter v%s' % (version.str())
        opts.log_info()
        if not check.host_setup(opts):
            log.warning('forcing build with known host setup problems')
        configs = build.get_configs(opts)
        if not setbuilder.list_bset_cfg_files(opts, configs):
            output = opts.get_arg('--output')
            if output is not None:
                output = output[1]
            formatter = text_formatter()
            format_opt = opts.get_arg('--format')
            if format_opt:
                if len(format_opt) != 2:
                    raise error.general('invalid format option: %s' %
                                        ('='.join(format_opt)))
                if format_opt[1] == 'text':
                    pass
                elif format_opt[1] == 'asciidoc':
                    formatter = asciidoc_formatter()
                elif format_opt[1] == 'html':
                    formatter = html_formatter()
                elif format_opt[1] == 'ini':
                    formatter = ini_formatter()
                elif format_opt[1] == 'xml':
                    formatter = xml_formatter()
                else:
                    raise error.general('invalid format: %s' % (format_opt[1]))
            r = report(formatter, configs, opts)
            for _config in opts.params():
                if output is None:
                    outname = path.splitext(_config)[0] + formatter.ext()
                    outname = outname.replace('/', '-')
                else:
                    outname = output
                config = build.find_config(_config, configs)
                if config is None:
                    raise error.general('config file not found: %s' % (inname))
                r.create(config, outname)
            del r
        else:
            raise error.general('invalid config type: %s' % (config))
    except error.general, gerr:
        print gerr
        sys.exit(1)
def run(args):
    try:
        optargs = { '--list-bsets':   'List available build sets',
                    '--list-configs': 'List available configurations',
                    '--format':       'Output format (text, html, asciidoc, ini)',
                    '--output':       'File name to output the report' }
        opts = options.load(args, optargs)
        if opts.get_arg('--output') and len(opts.params()) > 1:
            raise error.general('--output can only be used with a single config')
        print 'RTEMS Source Builder, Reporter v%s' % (version.str())
        opts.log_info()
        if not check.host_setup(opts):
            log.warning('forcing build with known host setup problems')
        configs = build.get_configs(opts)
        if not setbuilder.list_bset_cfg_files(opts, configs):
            output = opts.get_arg('--output')
            if output is not None:
                output = output[1]
            format = 'text'
            ext = '.txt'
            format_opt = opts.get_arg('--format')
            if format_opt:
                if len(format_opt) != 2:
                    raise error.general('invalid format option: %s' % ('='.join(format_opt)))
                if format_opt[1] == 'text':
                    pass
                elif format_opt[1] == 'asciidoc':
                    format = 'asciidoc'
                    ext = '.txt'
                elif format_opt[1] == 'html':
                    format = 'html'
                    ext = '.html'
                elif format_opt[1] == 'ini':
                    format = 'ini'
                    ext = '.ini'
                else:
                    raise error.general('invalid format: %s' % (format_opt[1]))
            r = report(format, configs, opts)
            for _config in opts.params():
                if output is None:
                    outname = path.splitext(_config)[0] + ext
                    outname = outname.replace('/', '-')
                else:
                    outname = output
                config = build.find_config(_config, configs)
                if config is None:
                    raise error.general('config file not found: %s' % (inname))
                r.create(config, outname)
            del r
        else:
            raise error.general('invalid config type: %s' % (config))
    except error.general, gerr:
        print gerr
        sys.exit(1)
def run():
    import sys

    ec = 0
    setbuilder_error = False
    try:
        optargs = {
            "--list-configs": "List available configurations",
            "--list-bsets": "List available build sets",
            "--list-deps": "List the dependent files.",
            "--bset-tar-file": "Create a build set tar file",
            "--pkg-tar-files": "Create package tar files",
            "--no-report": "Do not create a package report.",
            "--report-format": "The report format (text, html, asciidoc).",
        }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        log.notice("RTEMS Source Builder - Set Builder, %s" % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general("host build environment is not set up correctly")
        configs = build.get_configs(opts)
        if opts.get_arg("--list-deps"):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand("%{_prefix}")
            if opts.canadian_cross():
                opts.disable_install()

            if (
                not opts.dry_run()
                and not opts.canadian_cross()
                and not opts.no_install()
                and not path.ispathwritable(prefix)
            ):
                raise error.general("prefix is not writable: %s" % (path.host(prefix)))
            for bset in opts.params():
                setbuilder_error = True
                b = buildset(bset, configs, opts)
                b.build(deps)
                b = None
                setbuilder_error = False
        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print "dep[%d]: %s" % (c, d)
    except error.general, gerr:
        if not setbuilder_error:
            log.stderr(str(gerr))
        log.stderr("Build FAILED")
        ec = 1
def run(args):
    try:
        optargs = {
            "--list-bsets": "List available build sets",
            "--list-configs": "List available configurations",
            "--format": "Output format (text, html, asciidoc)",
            "--output": "File name to output the report",
        }
        opts = options.load(args, optargs)
        if opts.get_arg("--output") and len(opts.params()) > 1:
            raise error.general("--output can only be used with a single config")
        print "RTEMS Source Builder, Reporter v%s" % (version.str())
        opts.log_info()
        if not check.host_setup(opts):
            log.warning("forcing build with known host setup problems")
        configs = build.get_configs(opts)
        if not setbuilder.list_bset_cfg_files(opts, configs):
            output = opts.get_arg("--output")
            if output is not None:
                output = output[1]
            format = "text"
            ext = ".txt"
            format_opt = opts.get_arg("--format")
            if format_opt:
                if len(format_opt) != 2:
                    raise error.general("invalid format option: %s" % ("=".join(format_opt)))
                if format_opt[1] == "text":
                    pass
                elif format_opt[1] == "asciidoc":
                    format = "asciidoc"
                    ext = ".txt"
                elif format_opt[1] == "html":
                    format = "html"
                    ext = ".html"
                else:
                    raise error.general("invalid format: %s" % (format_opt[1]))
            r = report(format, configs, opts)
            for _config in opts.params():
                if output is None:
                    outname = path.splitext(_config)[0] + ext
                    outname = outname.replace("/", "-")
                else:
                    outname = output
                config = build.find_config(_config, configs)
                if config is None:
                    raise error.general("config file not found: %s" % (inname))
                r.create(config, outname)
            del r
        else:
            raise error.general("invalid config type: %s" % (config))
    except error.general, gerr:
        print gerr
        sys.exit(1)
def run():
    import sys
    try:
        optargs = {
            '--list-configs': 'List available configurations',
            '--list-bsets': 'List available build sets',
            '--list-deps': 'List the dependent files.',
            '--bset-tar-file': 'Create a build set tar file',
            '--pkg-tar-files': 'Create package tar files',
            '--no-report': 'Do not create a package report.',
            '--report-format': 'The report format (text, html, asciidoc).'
        }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        log.notice('RTEMS Source Builder - Set Builder, v%s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general(
                'host build environment is not set up correctly')
        configs = build.get_configs(opts)
        if opts.get_arg('--list-deps'):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand('%{_prefix}')
            if not opts.dry_run() and not opts.no_install() and \
                    not path.ispathwritable(prefix):
                raise error.general('prefix is not writable: %s' %
                                    (path.host(prefix)))
            for bset in opts.params():
                b = buildset(bset, configs, opts)
                b.build(deps)
                del b
        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print 'dep[%d]: %s' % (c, d)
    except error.general, gerr:
        log.notice(str(gerr))
        print >> sys.stderr, 'Build FAILED'
        sys.exit(1)
def run():
    import sys
    try:
        optargs = { '--list-configs':  'List available configurations',
                    '--list-bsets':    'List available build sets',
                    '--list-deps':     'List the dependent files.',
                    '--bset-tar-file': 'Create a build set tar file',
                    '--pkg-tar-files': 'Create package tar files',
                    '--no-report':     'Do not create a package report.',
                    '--report-format': 'The report format (text, html, asciidoc).' }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        log.notice('RTEMS Source Builder - Set Builder, v%s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general('host build environment is not set up correctly')
        configs = build.get_configs(opts)
        if opts.get_arg('--list-deps'):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand('%{_prefix}')
            if not opts.dry_run() and not opts.no_install() and \
                    not path.ispathwritable(prefix):
                raise error.general('prefix is not writable: %s' % (path.host(prefix)))
            for bset in opts.params():
                b = buildset(bset, configs, opts)
                b.build(deps)
                del b
        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print 'dep[%d]: %s' % (c, d)
    except error.general, gerr:
        log.notice(str(gerr))
        print >> sys.stderr, 'Build FAILED'
        sys.exit(1)
Exemple #12
0
def run():
    import sys
    ec = 0
    setbuilder_error = False
    mail = None
    try:
        optargs = {
            '--list-configs': 'List available configurations',
            '--list-bsets': 'List available build sets',
            '--list-configs': 'List available configuration files.',
            '--list-deps': 'List the dependent files.',
            '--bset-tar-file': 'Create a build set tar file',
            '--pkg-tar-files': 'Create package tar files',
            '--no-report': 'Do not create a package report.',
            '--report-format': 'The report format (text, html, asciidoc).'
        }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        if opts.get_arg('--mail'):
            mail = {'mail': mailer.mail(opts), 'output': log_capture()}
            to_addr = opts.get_arg('--mail-to')
            if to_addr is not None:
                mail['to'] = to_addr[1]
            else:
                mail['to'] = opts.defaults.expand('%{_mail_tools_to}')
            mail['from'] = mail['mail'].from_address()
        log.notice('RTEMS Source Builder - Set Builder, %s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general(
                'host build environment is not set up correctly')
        if mail:
            mail['header'] = os.linesep.join(mail['output'].get()) + os.linesep
            mail['header'] += os.linesep
            mail['header'] += 'Host: ' + reports.platform(
                'compact') + os.linesep
            indent = '       '
            for l in textwrap.wrap(reports.platform('extended'),
                                   width=80 - len(indent)):
                mail['header'] += indent + l + os.linesep
        configs = build.get_configs(opts)
        if opts.get_arg('--list-deps'):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand('%{_prefix}')
            if opts.canadian_cross():
                opts.disable_install()

            if not opts.dry_run() and \
               not opts.canadian_cross() and \
               not opts.no_install() and \
               not path.ispathwritable(prefix):
                raise error.general('prefix is not writable: %s' %
                                    (path.host(prefix)))

            for bset in opts.params():
                setbuilder_error = True
                b = buildset(bset, configs, opts)
                b.build(deps, mail=mail)
                b = None
                setbuilder_error = False

        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print('dep[%d]: %s' % (c, d))
    except error.general as gerr:
        if not setbuilder_error:
            log.stderr(str(gerr))
        log.stderr('Build FAILED')
        ec = 1
    except error.internal as ierr:
        if not setbuilder_error:
            log.stderr(str(ierr))
        log.stderr('Internal Build FAILED')
        ec = 1
    except error.exit as eerr:
        pass
    except KeyboardInterrupt:
        log.notice('abort: user terminated')
        ec = 1
    except:
        raise
        log.notice('abort: unknown error')
        ec = 1
    sys.exit(ec)
Exemple #13
0
def run(args):
    try:
        optargs = { '--list-bsets':   'List available build sets',
                    '--list-configs': 'List available configurations',
                    '--format':       'Output format (text, html, markdown, ini, xml)',
                    '--output':       'File name to output the report' }
        opts = options.load(args, optargs, logfile = False)
        if opts.get_arg('--output') and len(opts.params()) > 1:
            raise error.general('--output can only be used with a single config')
        print('RTEMS Source Builder, Reporter, %s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            log.warning('forcing build with known host setup problems')
        configs = build.get_configs(opts)
        if not setbuilder.list_bset_cfg_files(opts, configs):
            output = opts.get_arg('--output')
            if output is not None:
                output = output[1]
            formatter = text_formatter()
            format_opt = opts.get_arg('--format')
            if format_opt:
                if len(format_opt) != 2:
                    raise error.general('invalid format option: %s' % ('='.join(format_opt)))
                if format_opt[1] == 'text':
                    pass
                elif format_opt[1] == 'markdown':
                    formatter = markdown_formatter()
                elif format_opt[1] == 'html':
                    formatter = html_formatter()
                elif format_opt[1] == 'ini':
                    formatter = ini_formatter()
                elif format_opt[1] == 'xml':
                    formatter = xml_formatter()
                else:
                    raise error.general('invalid format: %s' % (format_opt[1]))
            r = report(formatter, configs, opts)
            for _config in opts.params():
                if output is None:
                    outname = path.splitext(_config)[0] + formatter.ext()
                    outname = outname.replace('/', '-')
                else:
                    outname = output
                config = build.find_config(_config, configs)
                if config is None:
                    raise error.general('config file not found: %s' % (_config))
                r.create(config, outname)
            del r
        else:
            raise error.general('invalid config type: %s' % (config))
    except error.general as gerr:
        print(gerr)
        sys.exit(1)
    except error.internal as ierr:
        print(ierr)
        sys.exit(1)
    except error.exit as eerr:
        pass
    except KeyboardInterrupt:
        log.notice('abort: user terminated')
        sys.exit(1)
    sys.exit(0)
def run():
    import sys
    ec = 0
    setbuilder_error = False
    mail = None
    try:
        optargs = { '--list-configs':  'List available configurations',
                    '--list-bsets':    'List available build sets',
                    '--list-configs':  'List available configuration files.',
                    '--list-deps':     'List the dependent files.',
                    '--bset-tar-file': 'Create a build set tar file',
                    '--pkg-tar-files': 'Create package tar files',
                    '--no-report':     'Do not create a package report.',
                    '--report-format': 'The report format (text, html, asciidoc).' }
        mailer.append_options(optargs)
        opts = options.load(sys.argv, optargs)
        if opts.get_arg('--mail'):
            mail = { 'mail'  : mailer.mail(opts),
                     'output': log_capture() }
            to_addr = opts.get_arg('--mail-to')
            if to_addr is not None:
                mail['to'] = to_addr[1]
            else:
                mail['to'] = opts.defaults.expand('%{_mail_tools_to}')
            mail['from'] = mail['mail'].from_address()
        log.notice('RTEMS Source Builder - Set Builder, %s' % (version.str()))
        opts.log_info()
        if not check.host_setup(opts):
            raise error.general('host build environment is not set up correctly')
        if mail:
            mail['header'] = os.linesep.join(mail['output'].get()) + os.linesep
            mail['header'] += os.linesep
            mail['header'] += 'Host: '  + reports.platform('compact') + os.linesep
            indent = '       '
            for l in textwrap.wrap(reports.platform('extended'),
                                   width = 80 - len(indent)):
                mail['header'] += indent + l + os.linesep
        configs = build.get_configs(opts)
        if opts.get_arg('--list-deps'):
            deps = []
        else:
            deps = None
        if not list_bset_cfg_files(opts, configs):
            prefix = opts.defaults.expand('%{_prefix}')
            if opts.canadian_cross():
                opts.disable_install()

            if not opts.dry_run() and \
               not opts.canadian_cross() and \
               not opts.no_install() and \
               not path.ispathwritable(prefix):
                raise error.general('prefix is not writable: %s' % (path.host(prefix)))

            for bset in opts.params():
                setbuilder_error = True
                b = buildset(bset, configs, opts)
                b.build(deps, mail = mail)
                b = None
                setbuilder_error = False

        if deps is not None:
            c = 0
            for d in sorted(set(deps)):
                c += 1
                print('dep[%d]: %s' % (c, d))
    except error.general as gerr:
        if not setbuilder_error:
            log.stderr(str(gerr))
        log.stderr('Build FAILED')
        ec = 1
    except error.internal as ierr:
        if not setbuilder_error:
            log.stderr(str(ierr))
        log.stderr('Internal Build FAILED')
        ec = 1
    except error.exit as eerr:
        pass
    except KeyboardInterrupt:
        log.notice('abort: user terminated')
        ec = 1
    except:
        raise
        log.notice('abort: unknown error')
        ec = 1
    sys.exit(ec)
def run(args):
    try:
        optargs = {
            '--list-bsets': 'List available build sets',
            '--list-configs': 'List available configurations',
            '--format': 'Output format (text, html, markdown, ini, xml)',
            '--output': 'File name to output the report',
            '--sanitize': 'Remove Remotes information from report'
        }
        opts = options.load(args, optargs, logfile=False)
        if opts.get_arg('--output') and len(opts.params()) > 1:
            raise error.general(
                '--output can only be used with a single config')
        print('RTEMS Source Builder, Reporter, %s' % (version.string()))
        opts.log_info()
        if not check.host_setup(opts):
            log.warning('forcing build with known host setup problems')
        configs = build.get_configs(opts)
        if not setbuilder.list_bset_cfg_files(opts, configs):
            output = opts.get_arg('--output')
            if output is not None:
                output = output[1]
            formatter = text_formatter()
            format_opt = opts.get_arg('--format')
            if format_opt:
                if len(format_opt) != 2:
                    raise error.general('invalid format option: %s' %
                                        ('='.join(format_opt)))
                if format_opt[1] == 'text':
                    pass
                elif format_opt[1] == 'markdown':
                    formatter = markdown_formatter()
                elif format_opt[1] == 'html':
                    formatter = html_formatter()
                elif format_opt[1] == 'ini':
                    formatter = ini_formatter()
                elif format_opt[1] == 'xml':
                    formatter = xml_formatter()
                else:
                    raise error.general('invalid format: %s' % (format_opt[1]))
            sanitize = False
            if opts.get_arg('--sanitize'):
                sanitize = True
            r = report(formatter, sanitize, configs, opts)
            for _config in opts.params():
                if output is None:
                    outname = path.splitext(_config)[0] + formatter.ext()
                    outname = outname.replace('/', '-')
                else:
                    outname = output
                config = build.find_config(_config, configs)
                if config is None:
                    raise error.general('config file not found: %s' %
                                        (_config))
                r.create(config, outname)
            del r
    except error.general as gerr:
        print(gerr)
        sys.exit(1)
    except error.internal as ierr:
        print(ierr)
        sys.exit(1)
    except error.exit as eerr:
        pass
    except KeyboardInterrupt:
        log.notice('abort: user terminated')
        sys.exit(1)
    sys.exit(0)