From 64f81bccb085d486c597598f0c51baebd99a7b83 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Wed, 28 Aug 2024 15:11:59 +0200 Subject: [PATCH] Update existing OSs when configuring (executing) partitioning --- .../partitioning/automatic/automatic_partitioning.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py b/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py index ca76a7c12a1..c713ae1b0c6 100644 --- a/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py +++ b/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py @@ -26,6 +26,7 @@ NonInteractivePartitioningTask from pyanaconda.modules.storage.partitioning.manual.utils import \ reformat_device +from pyanaconda.modules.storage.devicetree.root import find_existing_installations from pyanaconda.modules.storage.partitioning.interactive.utils import destroy_device from pyanaconda.modules.storage.partitioning.automatic.utils import get_candidate_disks, \ schedule_implicit_partitions, schedule_volumes, schedule_partitions, get_pbkdf_args, \ @@ -113,8 +114,13 @@ def _remove_mountpoint(self, storage, mountpoint): def _clear_partitions(self, storage): super()._clear_partitions(storage) + roots = find_existing_installations(storage.devicetree) + log.debug("DDDDD disks %s", storage.disks) + log.debug("DDDDD roots.mounts %s", [root.mounts for root in roots]) log.debug("DDDDD storage.roots.mounts %s", [root.mounts for root in storage.roots]) + storage.roots = roots + # TODO check that partitioning scheme matches - do it earlier in the # check but also here?