diff options
author | Simon Warta <[email protected]> | 2017-04-05 17:19:41 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-04-07 09:10:14 +0200 |
commit | 80ead8f098847943e519774a35858473edeca977 (patch) | |
tree | 5014dd95ec5879fdc9693bd5b1a86a454a50fcad /configure.py | |
parent | b0330917bbebba24576ba10759c799b68abfad7f (diff) |
Add state validation for modules list
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.py b/configure.py index addb7051e..c726335f7 100755 --- a/configure.py +++ b/configure.py @@ -2091,6 +2091,13 @@ def choose_modules_to_use(modules, module_policy, archinfo, ccinfo, options): logging.info('Loading modules: %s', ' '.join(sorted_modules_to_load)) + def validate_state(used_modules, unused_modules): + for _, unused_for_reason in unused_modules.items(): + if not unused_for_reason.isdisjoint(used_modules): + raise InternalError("Disabled modules and modules to load have common elements") + + validate_state(to_load, not_using_because) + display_module_information_unused(not_using_because) display_module_information_to_load(to_load) |