Changes to the build_module_config_string
This commit is contained in:
@@ -2182,12 +2182,21 @@ PACKAGE_MODULE_MAP = {
|
||||
|
||||
def build_module_config_string(package_list: list) -> str:
|
||||
active_modules = set()
|
||||
|
||||
for pkg in package_list:
|
||||
pkg_key = pkg.strip().lower()
|
||||
|
||||
# 1. Direkter Modulname
|
||||
if pkg_key in ALL_MODULE_KEYS:
|
||||
active_modules.add(pkg_key)
|
||||
# 2. Exaktes Paket-Mapping
|
||||
elif pkg_key in PACKAGE_MODULE_MAP:
|
||||
active_modules.update(PACKAGE_MODULE_MAP[pkg_key])
|
||||
# 3. Fallback für Teilstrings (z.B. "startpaket" -> "starter")
|
||||
elif "start" in pkg_key:
|
||||
active_modules.update(["library", "inventory", "student_cards"])
|
||||
elif "advanced" in pkg_key or "komplett" in pkg_key:
|
||||
active_modules.update(ALL_MODULE_KEYS)
|
||||
|
||||
config_parts = [
|
||||
f"{mod}={'on' if mod in active_modules else 'off'}"
|
||||
|
||||
Reference in New Issue
Block a user