Skip to content
Snippets Groups Projects
Commit 53235c94 authored by Anri Dellal's avatar Anri Dellal
Browse files

Move code for getting required kernel options in separate function

parent a7ce89f7
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,19 @@ def check_config(config_path, config_path_pretty, config_arch, pkgver,
# Loop through necessary config options, and print a warning,
# if any is missing
ret = True
options = get_required_options(options, pkgver)
logging.info(options)
for option, option_value in options.items():
if not check_option(component, details, config,
config_path_pretty, option, option_value):
ret = False
if not details:
break # do not give too much error messages
return ret
def get_required_options(options, pkgver):
for rule, archs_options in options.items():
# Skip options irrelevant for the current kernel's version
if not pmb.parse.version.check_string(pkgver, rule):
......@@ -96,13 +109,7 @@ def check_config(config_path, config_path_pretty, config_arch, pkgver,
if config_arch not in architectures:
continue
for option, option_value in options.items():
if not check_option(component, details, config,
config_path_pretty, option, option_value):
ret = False
if not details:
break # do not give too much error messages
return ret
return options
def check(args, pkgname, force_anbox_check=False, details=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment