forked from Mirror/pmbootstrap
kconfig check: less errors for non-detailed mode
Don't print more than one non-detailed error per component, as it results in the same message. Adjust the description of the details parameter to reflect this. Reviewed-by: Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230312151325.1968-10-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
dffb8614bc
commit
f393bbdab1
1 changed files with 5 additions and 4 deletions
|
@ -79,7 +79,7 @@ def check_option(component, details, config, config_path, option,
|
||||||
Check, whether one kernel config option has a given value.
|
Check, whether one kernel config option has a given value.
|
||||||
|
|
||||||
:param component: name of the component to test (postmarketOS, waydroid, …)
|
:param component: name of the component to test (postmarketOS, waydroid, …)
|
||||||
:param details: print all warnings if True, otherwise one generic warning
|
:param details: print all warnings if True, otherwise one per component
|
||||||
:param config: full kernel config as string
|
:param config: full kernel config as string
|
||||||
:param config_path: full path to kernel config file
|
:param config_path: full path to kernel config file
|
||||||
:param option: name of the option to check, e.g. EXT4_FS
|
:param option: name of the option to check, e.g. EXT4_FS
|
||||||
|
@ -134,7 +134,7 @@ def check_config_options_set(config, config_path, config_arch, options,
|
||||||
}
|
}
|
||||||
:param component: name of the component to test (postmarketOS, waydroid, …)
|
:param component: name of the component to test (postmarketOS, waydroid, …)
|
||||||
:param pkgver: kernel version
|
:param pkgver: kernel version
|
||||||
:param details: print all warnings if True, otherwise one generic warning
|
:param details: print all warnings if True, otherwise one per component
|
||||||
:returns: True if the check passed, False otherwise
|
:returns: True if the check passed, False otherwise
|
||||||
"""
|
"""
|
||||||
ret = True
|
ret = True
|
||||||
|
@ -162,8 +162,9 @@ def check_config_options_set(config, config_path, config_arch, options,
|
||||||
if not check_option(component, details, config, config_path,
|
if not check_option(component, details, config, config_path,
|
||||||
option, option_value):
|
option, option_value):
|
||||||
ret = False
|
ret = False
|
||||||
|
# Stop after one non-detailed error
|
||||||
if not details:
|
if not details:
|
||||||
break # do not give too much error messages
|
return False
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,7 +177,7 @@ def check_config(config_path, config_arch, pkgver, components_list=[],
|
||||||
:param config_arch: architecture name (alpine format, e.g. aarch64, x86_64)
|
:param config_arch: architecture name (alpine format, e.g. aarch64, x86_64)
|
||||||
:param pkgver: kernel version
|
:param pkgver: kernel version
|
||||||
:param components_list: what to check for, e.g. ["waydroid", "iwd"]
|
:param components_list: what to check for, e.g. ["waydroid", "iwd"]
|
||||||
:param details: print all warnings if True, otherwise one generic warning
|
:param details: print all warnings if True, otherwise one per component
|
||||||
:param enforce_check: set to False to not fail kconfig check as long as
|
:param enforce_check: set to False to not fail kconfig check as long as
|
||||||
everything in kconfig_options is set correctly, even
|
everything in kconfig_options is set correctly, even
|
||||||
if additional components are checked
|
if additional components are checked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue