diff --git a/configs/baseline/airootfs/usr/lib/python3.14/site-packages/pyanaconda/ui/gui/spokes/fws_recap.py b/configs/baseline/airootfs/usr/lib/python3.14/site-packages/pyanaconda/ui/gui/spokes/fws_recap.py index b2ceb8a..81a692c 100644 --- a/configs/baseline/airootfs/usr/lib/python3.14/site-packages/pyanaconda/ui/gui/spokes/fws_recap.py +++ b/configs/baseline/airootfs/usr/lib/python3.14/site-packages/pyanaconda/ui/gui/spokes/fws_recap.py @@ -165,6 +165,38 @@ def _config_lines(): return lines, desk, method +def _windows_dualboot_lines(selected): + """Section dual-boot Windows : lit /tmp/fws-windows (parse LITTÉRAL, jamais + sourcé), montre le disque qui SERA EFFACÉ et ALERTE en cas de conflit avec la + cible d'installation FWS (même disque choisi pour les deux).""" + state = {} + try: + with open("/tmp/fws-windows") as fh: + for line in fh: + if "=" in line and not line.lstrip().startswith("#"): + key, _, val = line.partition("=") + state[key.strip()] = val.strip() + except OSError: + return [] + if state.get("enabled") != "1": + return [" • Dual-boot Windows : désactivé (FWS uniquement)"] + disk = state.get("disk", "?") + size = state.get("size_gib", "?") + iso = state.get("iso", "") + iso_name = iso.rsplit("/", 1)[-1] if iso else "(aucune ISO fournie)" + lines = [ + f" • Dual-boot Windows : ACTIVÉ — {disk} ({size} GiO NTFS)", + f" ISO : {iso_name}", + f" ⚠ TOUT le disque {disk} sera EFFACÉ et dédié à Windows.", + ] + base = disk.rsplit("/", 1)[-1] + if base and base in selected: + lines.append( + f" ⛔ CONFLIT : {disk} est AUSSI une cible d'installation FWS —" + " choisissez des disques DIFFÉRENTS (sinon l'un écrase l'autre).") + return lines + + def _build_summary(): config_lines, desk, method = _config_lines() config_text = "\n".join(config_lines) \ @@ -214,6 +246,9 @@ def _build_summary(): extras = ("Steam, Wine, VR (Monado/OpenXR), winboat-bin" if desk != "cli" else "rien de plus (choix CLI)") + win_text = "\n".join(_windows_dualboot_lines(selected)) \ + or " • Dual-boot Windows : désactivé (FWS uniquement)" + return f"""\ ══════════════════════════════════════════════════════════ FWS — RÉCAPITULATIF AVANT INSTALLATION @@ -226,6 +261,9 @@ DISQUES {disk_warn} {disk_text} +DUAL-BOOT WINDOWS (gaming — Valorant/LoL) +{win_text} + MATÉRIEL DÉTECTÉ • Virtualisation : {virt} • Réseau : {net}