代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6515d0779a41c1ea902ada86e4e911821cded92e Mon Sep 17 00:00:00 2001
From: Vladimir Slavik <vslavik@redhat.com>
Date: Thu, 3 Sep 2020 19:27:28 +0200
Subject: [PATCH] Check if original partitions are mounted, too
Resolves: rhbz#1751698
---
pyanaconda/modules/storage/checker/utils.py | 30 +++++++++++++++------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/modules/storage/checker/utils.py b/pyanaconda/modules/storage/checker/utils.py
index ff3ee3a6b..c40aa1dc3 100644
--- a/pyanaconda/modules/storage/checker/utils.py
+++ b/pyanaconda/modules/storage/checker/utils.py
@@ -417,11 +417,15 @@ def verify_luks2_memory_requirements(storage, constraints, report_error, report_
def verify_mounted_partitions(storage, constraints, report_error, report_warning):
""" Check the selected disks to make sure all their partitions are unmounted.
+ Check both the currently known and original partitions.
+
:param storage: a storage to check
:param constraints: a dictionary of constraints
:param report_error: a function for error reporting
:param report_warning: a function for warning reporting
"""
+ partitions_to_check = {}
+
for disk in storage.disks:
if disk.protected:
continue
@@ -430,14 +434,24 @@ def verify_mounted_partitions(storage, constraints, report_error, report_warning
continue
for part in disk.format.partitions:
- part_dev = storage.devicetree.get_device_by_path(part.path)
- if part_dev and part_dev.protected:
- log.debug("Not checking protected %s for being mounted, assuming live "
- "image mount", part.path)
- continue
- if part.busy:
- report_error(_("%s is currently mounted and cannot be used for the "
- "installation. Please unmount it and retry.") % part.path)
+ if part.path not in partitions_to_check:
+ partitions_to_check[part.path] = part
+
+ if hasattr(disk.original_format, "partitions"):
+ for part in disk.original_format.partitions:
+ if part.path not in partitions_to_check:
+ partitions_to_check[part.path] = part
+
+ for path, part in partitions_to_check.items():
+ part_dev = storage.devicetree.get_device_by_path(path)
+ if part_dev and part_dev.protected:
+ log.debug("Not checking protected %s for being mounted, assuming live "
+ "image mount", path)
+ return
+
+ if part.busy:
+ report_error(_("%s is currently mounted and cannot be used for the "
+ "installation. Please unmount it and retry.") % path)
def verify_lvm_destruction(storage, constraints, report_error, report_warning):
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。