Fixup error shell, exception log level in main() and arch checking before docker wrapping in cmd_build()
This commit is contained in:
parent
5eefcc9942
commit
f90bf1006a
2 changed files with 7 additions and 4 deletions
9
main.py
9
main.py
|
@ -34,10 +34,13 @@ def cli(verbose: bool = False, config_file: str = None, no_wrapper: bool = False
|
||||||
def main():
|
def main():
|
||||||
try:
|
try:
|
||||||
return cli(prog_name='kupferbootstrap')
|
return cli(prog_name='kupferbootstrap')
|
||||||
except Exception:
|
except Exception as ex:
|
||||||
logging.fatal(get_trace())
|
if config.runtime['verbose']:
|
||||||
logging.info('Starting error shell. Type exit to quit.')
|
logging.fatal(get_trace())
|
||||||
|
else:
|
||||||
|
logging.fatal(ex)
|
||||||
if config.runtime['error_shell']:
|
if config.runtime['error_shell']:
|
||||||
|
logging.info('Starting error shell. Type exit to quit.')
|
||||||
subprocess.call('/bin/bash')
|
subprocess.call('/bin/bash')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
|
@ -497,13 +497,13 @@ def cmd_packages():
|
||||||
@click.option('--arch', default=None)
|
@click.option('--arch', default=None)
|
||||||
@click.argument('paths', nargs=-1)
|
@click.argument('paths', nargs=-1)
|
||||||
def cmd_build(paths: list[str], force=False, arch=None):
|
def cmd_build(paths: list[str], force=False, arch=None):
|
||||||
enforce_wrap()
|
|
||||||
if arch is None:
|
if arch is None:
|
||||||
# arch = config.get_profile()...
|
# arch = config.get_profile()...
|
||||||
arch = 'aarch64'
|
arch = 'aarch64'
|
||||||
|
|
||||||
if arch not in ARCHES:
|
if arch not in ARCHES:
|
||||||
raise Exception(f'Unknown architecture "{arch}". Choices: {", ".join(ARCHES)}')
|
raise Exception(f'Unknown architecture "{arch}". Choices: {", ".join(ARCHES)}')
|
||||||
|
enforce_wrap()
|
||||||
|
|
||||||
for _arch in set([arch, config.runtime['arch']]):
|
for _arch in set([arch, config.runtime['arch']]):
|
||||||
check_prebuilts(_arch)
|
check_prebuilts(_arch)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue