forked from Mirror/pmbootstrap
pmbootstrap status: print config overview (!1878)
Add an overview of the most important config options, which the user has chosen in "pmbootstrap init". Related: #1829
This commit is contained in:
parent
1724ed4665
commit
804743e65a
1 changed files with 19 additions and 0 deletions
|
@ -5,6 +5,23 @@ import logging
|
||||||
import pmb.config.workdir
|
import pmb.config.workdir
|
||||||
|
|
||||||
|
|
||||||
|
def print_config(args):
|
||||||
|
""" Print an overview of what was set in "pmbootstrap init". """
|
||||||
|
logging.info("*** CONFIG ***")
|
||||||
|
|
||||||
|
info = args.deviceinfo
|
||||||
|
logging.info("Device: {} ({}, \"{}\")"
|
||||||
|
.format(args.device, info["arch"], info["name"]))
|
||||||
|
|
||||||
|
if pmb.parse._apkbuild.kernels(args, args.device):
|
||||||
|
logging.info("Kernel: " + args.kernel)
|
||||||
|
|
||||||
|
if args.extra_packages != "none":
|
||||||
|
logging.info("Extra packages: {}".format(args.extra_packages))
|
||||||
|
|
||||||
|
logging.info("User Interface: {}".format(args.ui))
|
||||||
|
|
||||||
|
|
||||||
def print_checks_chroots_outdated(args, details):
|
def print_checks_chroots_outdated(args, details):
|
||||||
""" Check if chroots were zapped recently.
|
""" Check if chroots were zapped recently.
|
||||||
:param details: if True, print each passing check instead of a summary
|
:param details: if True, print each passing check instead of a summary
|
||||||
|
@ -43,6 +60,8 @@ def print_checks(args, details):
|
||||||
def print_status(args, details=False):
|
def print_status(args, details=False):
|
||||||
""" :param details: if True, print each passing check instead of a summary
|
""" :param details: if True, print each passing check instead of a summary
|
||||||
:returns: True if all checks passed, False otherwise """
|
:returns: True if all checks passed, False otherwise """
|
||||||
|
print_config(args)
|
||||||
|
logging.info("")
|
||||||
ret = print_checks(args, details)
|
ret = print_checks(args, details)
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue