merge mainline to 20.03-LTS-NEXT

This commit is contained in:
zhangrui 2020-10-29 20:33:14 +08:00
parent 1ef09398b6
commit 3358088af1
11 changed files with 373 additions and 139 deletions

View File

@ -0,0 +1,31 @@
From 99970253a5600555118a64046259b7ef638655df Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Fri, 11 Sep 2020 11:26:41 +0800
Subject: [PATCH] add boot args for smmu and video
---
pyanaconda/modules/storage/bootloader/grub2.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/pyanaconda/modules/storage/bootloader/grub2.py b/pyanaconda/modules/storage/bootloader/grub2.py
index 17e46e5..a70ba7a 100644
--- a/pyanaconda/modules/storage/bootloader/grub2.py
+++ b/pyanaconda/modules/storage/bootloader/grub2.py
@@ -271,6 +271,14 @@ class GRUB2(BootLoader):
if blivet.arch.is_aarch64():
log.info("check boot args:%s", arg_str)
arg_str += " crashkernel=1024M,high"
+ if "smmu.bypassdev=0x1000:0x17" not in arg_str:
+ arg_str += " smmu.bypassdev=0x1000:0x17"
+ if "smmu.bypassdev=0x1000:0x15" not in arg_str:
+ arg_str += " smmu.bypassdev=0x1000:0x15"
+ if "video=efifb:off" not in arg_str:
+ arg_str += " video=efifb:off"
+ if "video=VGA-1:640x480-32@60me" not in arg_str:
+ arg_str += " video=VGA-1:640x480-32@60me"
else:
arg_str += " crashkernel=512M"
--
2.23.0

View File

@ -1,25 +0,0 @@
From c5a47d3285678f9d9ebbbab3d18946d858513732 Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Fri, 19 Jun 2020 11:04:30 +0800
Subject: [PATCH] add boot options for smmu and crashkernel
---
data/anaconda.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/anaconda.conf b/data/anaconda.conf
index 89731f4..e75354d 100644
--- a/data/anaconda.conf
+++ b/data/anaconda.conf
@@ -124,7 +124,7 @@ preserved_arguments =
speakup_synth apic noapic apm ide noht acpi video
pci nodmraid nompath nomodeset noiswmd fips selinux
biosdevname ipv6.disable net.ifnames net.ifnames.prefix
- nosmt
+ nosmt smmu.bypassdev crashkernel
[Storage]
--
2.23.0

View File

@ -1,39 +0,0 @@
From ebfecf7cdd3ed8cdaf118d3da97518c6f4de5023 Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Thu, 18 Jun 2020 17:21:09 +0800
Subject: [PATCH] add passwd check policy
---
pyanaconda/ui/gui/spokes/root_password.py | 2 +-
pyanaconda/ui/gui/spokes/user.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py
index cfb9663..313ba0f 100644
--- a/pyanaconda/ui/gui/spokes/root_password.py
+++ b/pyanaconda/ui/gui/spokes/root_password.py
@@ -290,7 +290,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
self.needs_waiver = False
else:
if not self._validity_check.result.success:
- self.can_go_back = True
+ self.can_go_back = False
self.needs_waiver = True
elif not self._ascii_check.result.success:
self.can_go_back = True
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 82fbdc8..29e60cb 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -673,7 +673,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
if not self._confirm_check.result.success:
self.can_go_back = False
if not self._validity_check.result.success:
- self.can_go_back = True
+ self.can_go_back = False
self.needs_waiver = True
elif not self._ascii_check.result.success:
self.can_go_back = True
--
2.23.0

View File

@ -1,7 +1,7 @@
%define _empty_manifest_terminate_build 0
Name: anaconda
Version: 33.19
Release: 2
Release: 12
Summary: Graphical system installer
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -12,29 +12,34 @@ Patch6000: Fix-hiding-of-network-device-activation-switch.patch
Patch9000: add-passwd-policy.patch
Patch9001: fix-hostname-info.patch
patch9002: add-passwd-check-policy.patch
Patch9003: bugfix-fix-data-encrypt-weak-passphrase-save.patch
Patch9004: disable-set-passwd-without-confirmation.patch
Patch9005: bugfix-logo-display-in-low-screen-resolution.patch
Patch9006: make-name-not-force-to-uppercase.patch
Patch9007: bugfix-GUI-nfs-unknown-error.patch
Patch9008: hide-help-button.patch
Patch9009: modify-interface-is-extended-in-Chinese-mode.patch
Patch9010: remove-vender-issue-in-netdev.patch
Patch9011: modify-arguments-parsing.patch
Patch9012: add-boot-options-for-smmu-and-crashkernel.patch
Patch9013: disable-product-name-in-welcome-is-uppercase.patch
Patch9014: modify-default-timezone.patch
Patch9015: modify-network-hostname-dot-illegal.patch
Patch9016: disable-ssh-login-checkbox.patch
Patch9017: bugfix-add-kdump-parameter-into-kernel-cmdline.patch
Patch9002: disable-set-passwd-without-confirmation.patch
Patch9003: bugfix-logo-display-in-low-screen-resolution.patch
Patch9004: make-name-not-force-to-uppercase.patch
Patch9005: bugfix-GUI-nfs-unknown-error.patch
Patch9006: hide-help-button.patch
Patch9007: modify-interface-is-extended-in-Chinese-mode.patch
Patch9008: remove-vender-issue-in-netdev.patch
Patch9009: modify-arguments-parsing.patch
Patch9011: disable-product-name-in-welcome-is-uppercase.patch
Patch9012: modify-default-timezone.patch
Patch9013: modify-network-hostname-dot-illegal.patch
Patch9014: disable-ssh-login-checkbox.patch
Patch9015: bugfix-add-kdump-parameter-into-kernel-cmdline.patch
Patch9016: bugfix-fix-password-policy.patch
Patch9017: add-boot-args-for-smmu-and-video.patch
Patch9018: disable-disk-encryption.patch
Patch6001: anaconda-Fix-stage2-as-default-sources.patch
Patch6002: anaconda-Allow-to-detect-devices-with-the-iso9660-file-system.patch
Patch6003: bugfix-do-not-test-if-repo-is-valid-based-on-treeinfo-file.patch
Patch6004: bugfix-move-verify-valid-installtree-to-source-module-utils.patch
Patch6005: bugfix-add-tests-for-verify-valid-installtree-function.patch
Patch6006: bugfix-rename-function-for-a-simple-check-for-DNF-repository.patch
Patch6003: bugfix-do-not-test-if-repo-is-valid-based-on-treeinfo-file.patch
Patch6004: bugfix-move-verify-valid-installtree-to-source-module-utils.patch
Patch6005: bugfix-add-tests-for-verify-valid-installtree-function.patch
Patch6006: bugfix-rename-function-for-a-simple-check-for-DNF-repository.patch
Patch9023: bugfix-add-dnf-transaction-timeout.patch
Patch6007: fix-0-storage-devices-selected.patch
Patch6008: fix-remove-unknow-partition-is-sda-failed.patch
%define dbusver 1.2.3
%define dnfver 3.6.0
@ -75,7 +80,7 @@ Requires: adwaita-icon-theme python3-kickstart
Requires: tigervnc-server-minimal libxklavier >= %{libxklavierver} libgnomekbd
Requires: libtimezonemap >= %{libtimezonemapver} xz
Requires: nm-connection-editor keybinder3 anaconda-user-help >= %{helpver} yelp system-logos
Requires: blivet-gui-runtime python3 dracut >= %{dracutver} dracut-network dracut-live
Requires: python3 dracut >= %{dracutver} dracut-network dracut-live
%ifarch %{ix86} x86_64
BuildRequires: desktop-file-utils
Requires: zenity fcoe-utils >= %{fcoeutilsver}
@ -192,6 +197,7 @@ update-desktop-database &> /dev/null || :
%{python3_sitearch}/pyanaconda/ui/gui/*
%{_prefix}/libexec/anaconda/dd_*
%{_prefix}/lib/dracut/modules.d/80%{name}/*
%exclude %{python3_sitearch}/pyanaconda/ui/gui/spokes/blivet_gui.*
%files core
%defattr(-,root,root)
@ -212,6 +218,7 @@ update-desktop-database &> /dev/null || :
%exclude %{_prefix}/libexec/anaconda/dd_*
%exclude %{_libdir}/libAnacondaWidgets.so
%exclude %{_datadir}/gtk-doc
%exclude %{_datadir}/anaconda/ui/spokes/blivet_gui.*
%exclude %{_datadir}/glade/catalogs/AnacondaWidgets.xml
%exclude %{python3_sitearch}/pyanaconda/rescue.py*
%exclude %{python3_sitearch}/pyanaconda/__pycache__/rescue.*
@ -246,66 +253,109 @@ update-desktop-database &> /dev/null || :
%{_datadir}/gtk-doc
%changelog
* Mon Sep 21 2020 zhangrui <zhangrui182@huawei.com> - 33.19-2
* Mon Oct 26 2020 fengtao <fengtao40@huawei.com> - 33.19-12
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:do not need to verify treeinfo when using nfs
- DESC:bugfix for partitioning when sda exists a ext4 filesystem
* Thu Aug 27 2020 hanzhijun <hanzhijun1@huawei.com> - 33.19-1
* Sat Sep 26 2020 fengtao <fengtao40@huawei.com> - 33.19-11
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add dnf transactions timeout
* Thu Sep 17 2020 zhuqingfu <zhuqingfu1@huawei.com> - 33.19-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:do not require treeinfo
* Wed Sep 16 2020 xiaqirong <xiaqirong1@huawei.com> - 33.19-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:disable disk encryption
* Fri Sep 11 2020 fengtao <fengtao40@huawei.com> - 33.19-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add boot args for smmu and video
* Thu Sep 10 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:revert add-passwd-check-policy.patch and bugfix-fix-encrypt-weak-passphrase-save.patch
fix password policy
* Fri Sep 4 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix password policy
* Mon Aug 31 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix kdump patch err
* Fri Aug 28 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:remove dependency on blivet-gui-runtime
* Fri Aug 7 2020 fengtao <fengtao40@huawei.com> - 33.19-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix stage2 as default sources
* Tue Jul 14 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add kdump parameter into kernel cmdline
* Fri Jun 19 2020 fengtao <fengtao40@huawei.com> - 33.19-1
- update version to 33.19
* Mon Aug 24 2020 yanan <yanan@huawei.com> - 29.24.7-32
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:add a temporary hack to fix installations on ppc64le and aarch64
* Fri Aug 21 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 29.24.7-31
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Set up LD_PRELOAD for the Payloads module
* Tue Aug 18 2020 chenyaqiang <chenyaqiang@huawei.com> - 29.24.7-30
- rebuild for package build
* Mon May 25 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-29
- rebuild for dracut
* Mon Mar 9 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-28
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:add boot options for dummy
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-27
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:Remove initThreading method from pyanaconda.threading
* Thu Feb 06 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-26
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:modify network hostname dot error
* Thu Jan 16 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-25
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:modify default timezone and zh_CN.po
* Thu Jan 16 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-24
- Type:bugfix
- Id:NA
- ID:NA
- SUG:NA
- DESC:fix setup fail in decode
* Thu Jan 16 2020 openEuler Buildteam <buildteam@openeuler.org> - 29.24.7-23
- Type:enhancement
- Id:NA
- ID:NA
- SUG:NA
- DESC:modify openeuler in welcome to lowercase

4
anaconda.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: rhinstaller/anaconda
tag_prefix: anaconda-
seperator: .

View File

@ -0,0 +1,52 @@
From d1bb8d1d49de9668e8afc697aef8166d6c5bfabe Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Fri, 25 Sep 2020 23:16:04 +0800
Subject: [PATCH] add dnf transaction timeout
---
pyanaconda/core/constants.py | 3 +++
pyanaconda/payload/dnf/payload.py | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py
index 0e4cc15..607f96c 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -448,6 +448,9 @@ URL_TYPE_BASEURL = "BASEURL"
URL_TYPE_MIRRORLIST = "MIRRORLIST"
URL_TYPE_METALINK = "METALINK"
+#DNF trasactions timeout
+DNF_TRANSACTIONS_TIMEOUT = 1800
+
# The default source for the DNF payload.
DNF_DEFAULT_SOURCE_TYPE = SOURCE_TYPE_CLOSEST_MIRROR
diff --git a/pyanaconda/payload/dnf/payload.py b/pyanaconda/payload/dnf/payload.py
index f927208..08963cc 100644
--- a/pyanaconda/payload/dnf/payload.py
+++ b/pyanaconda/payload/dnf/payload.py
@@ -19,6 +19,7 @@
import configparser
import functools
import multiprocessing
+import queue
import os
import shutil
import sys
@@ -1356,7 +1357,11 @@ class DNFPayload(Payload):
if errors.errorHandler.cb(exc) == errors.ERROR_RAISE:
log.error("Installation failed: %r", exc)
go_to_failure_limbo()
- (token, msg) = queue_instance.get()
+ try:
+ (token, msg) = queue_instance.get(True, constants.DNF_TRANSACTIONS_TIMEOUT)
+ except queue.Empty:
+ msg = ("Payload error - DNF installation has timeouted")
+ raise PayloadError(msg)
process.join()
# Don't close the mother base here, because we still need it.
--
2.23.0

View File

@ -1,25 +0,0 @@
From e74a97aaf7e3f0e8d9b1f961eb68712337924720 Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Thu, 18 Jun 2020 17:30:22 +0800
Subject: [PATCH] bugfix fix data encrypt weak passphrase save
---
pyanaconda/ui/gui/spokes/lib/passphrase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py
index 99ca2d4..0314d6d 100644
--- a/pyanaconda/ui/gui/spokes/lib/passphrase.py
+++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py
@@ -158,7 +158,7 @@ class PassphraseDialog(GUIObject):
self._passphrase_good_enough = True
elif len(self._checker.failed_checks) == 1 and self._validity_check in self._checker._failed_checks:
# only the password validity check failed
- if self._checker.policy.strict:
+ if self._checker.policy.strict or self._strength_bar.get_value() < 2:
# this is not fine for the strict password policy
self._passphrase_good_enough = False
else:
--
2.23.0

View File

@ -0,0 +1,29 @@
From 19264b192083d5cf38750a9cef0ec0a55eea3cfe Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Thu, 10 Sep 2020 14:59:14 +0800
Subject: [PATCH] bugfix fix password policy
---
data/interactive-defaults.ks | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/data/interactive-defaults.ks b/data/interactive-defaults.ks
index 0177cf9..7e43a39 100644
--- a/data/interactive-defaults.ks
+++ b/data/interactive-defaults.ks
@@ -4,9 +4,9 @@ firstboot --enable
%anaconda
# Default password policies
-pwpolicy root --notstrict --minlen=8 --minquality=1 --nochanges --notempty
-pwpolicy user --notstrict --minlen=8 --minquality=1 --nochanges --emptyok
-pwpolicy luks --notstrict --minlen=8 --minquality=1 --nochanges --notempty
+pwpolicy root --strict --minlen=8 --minquality=1 --nochanges --notempty
+pwpolicy user --strict --minlen=8 --minquality=1 --nochanges --emptyok
+pwpolicy luks --strict --minlen=8 --minquality=1 --nochanges --notempty
# NOTE: This applies only to *fully* interactive installations, partial kickstart
# installations use defaults specified in pyanaconda/pwpolicy.py.
# Automated kickstart installs simply ignore the password policy as the policy
--
1.8.3.1

View File

@ -0,0 +1,71 @@
From bec6776715baaff79d29e1703b7c3306c265071b Mon Sep 17 00:00:00 2001
From: xia_qirong <xiaqirong1@huawei.com>
Date: Wed, 16 Sep 2020 15:28:39 +0800
Subject: [PATCH] disable disk encryption
---
pyanaconda/ui/gui/spokes/custom_storage.py | 8 ++++----
pyanaconda/ui/gui/spokes/storage.py | 7 ++++---
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom_storage.py b/pyanaconda/ui/gui/spokes/custom_storage.py
index 347a0e0..d72e315 100644
--- a/pyanaconda/ui/gui/spokes/custom_storage.py
+++ b/pyanaconda/ui/gui/spokes/custom_storage.py
@@ -796,8 +796,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
fancy_set_sensitive(self._reformatCheckbox, self._permissions.reformat)
# Set up the encryption.
- self._encryptCheckbox.set_active(self._request.device_encrypted)
- fancy_set_sensitive(self._encryptCheckbox, self._permissions.device_encrypted)
+ self._encryptCheckbox.set_active(False)
+ fancy_set_sensitive(self._encryptCheckbox, False)
self._encryptCheckbox.set_inconsistent(self._request.container_encrypted)
text = _("The container is encrypted.") if self._request.container_encrypted else ""
@@ -1268,7 +1268,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
self._encryptCheckbox.set_active(False)
self._encryptCheckbox.set_inconsistent(True)
- fancy_set_sensitive(self._encryptCheckbox, self._permissions.device_encrypted)
+ fancy_set_sensitive(self._encryptCheckbox, False)
self._update_luks_combo()
# Update the UI.
@@ -1490,7 +1490,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
# Update the UI.
fancy_set_sensitive(self._labelEntry, self._permissions.label)
- fancy_set_sensitive(self._encryptCheckbox, self._permissions.device_encrypted)
+ fancy_set_sensitive(self._encryptCheckbox, False)
self._update_luks_combo()
fancy_set_sensitive(self._fsCombo, self._permissions.format_type)
self.on_value_changed()
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 9494d6a..b2c0d3e 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -289,6 +289,9 @@ class StorageSpoke(NormalSpoke, StorageCheckHandler):
# Configure the partitioning methods.
self._configure_partitioning_methods()
+ # disable disk encryption
+ self._encryption_revealer.set_reveal_child(False)
+
def _configure_partitioning_methods(self):
if "CustomPartitioningSpoke" in conf.ui.hidden_spokes:
self._custom_part_radio_button.set_visible(False)
@@ -325,9 +328,7 @@ class StorageSpoke(NormalSpoke, StorageCheckHandler):
# as Blivet GUI handles encryption per encrypted device, not globally.
# Hide it also for the interactive partitioning as CustomPartitioningSpoke
# provides support for encryption of mount points.
- self._encryption_revealer.set_reveal_child(
- current_partitioning_method == PARTITIONING_METHOD_AUTOMATIC
- )
+ self._encryption_revealer.set_reveal_child(False)
# Hide the reclaim space checkbox if automatic storage configuration is not used.
self._reclaim_revealer.set_reveal_child(
--
1.8.3.1

View File

@ -0,0 +1,40 @@
From aa819ebee288aa307dc204337228c402189fd5e5 Mon Sep 17 00:00:00 2001
From: "Qr.Xia" <69908158+xqrustc2020@users.noreply.github.com>
Date: Mon, 12 Oct 2020 11:04:27 +0800
Subject: [PATCH] fix 0 storage devices selected
"0 storage devices selected" is printed because the format_type of sda
is "ext4" rather than "disklabel", and disk 'sda' is filtered by
filter_disks_by_names(partitioned_devices, selected_disks).
Resolves: rhbz#1878661
---
pyanaconda/ui/gui/spokes/custom_storage.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom_storage.py b/pyanaconda/ui/gui/spokes/custom_storage.py
index d72e315..b89866c 100644
--- a/pyanaconda/ui/gui/spokes/custom_storage.py
+++ b/pyanaconda/ui/gui/spokes/custom_storage.py
@@ -47,7 +47,7 @@ from pyanaconda.modules.common.structures.partitioning import PartitioningReques
from pyanaconda.modules.common.structures.device_factory import DeviceFactoryRequest, \
DeviceFactoryPermissions
from pyanaconda.product import productName, productVersion
-from pyanaconda.ui.lib.storage import reset_bootloader, create_partitioning, filter_disks_by_names
+from pyanaconda.ui.lib.storage import reset_bootloader, create_partitioning
from pyanaconda.core.storage import DEVICE_TYPE_UNSUPPORTED, DEVICE_TEXT_MAP, \
MOUNTPOINT_DESCRIPTIONS, NAMED_DEVICE_TYPES, CONTAINER_DEVICE_TYPES, device_type_from_autopart, \
PROTECTED_FORMAT_TYPES, DEVICE_TYPE_BTRFS, DEVICE_TYPE_MD, Size
@@ -303,9 +303,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
self._default_file_system = self._device_tree.GetDefaultFileSystem()
# Initialize the selected disks.
- selected_disks = self._disk_selection.SelectedDisks
- partitioned_devices = self._device_tree.GetPartitioned()
- self._selected_disks = filter_disks_by_names(partitioned_devices, selected_disks)
+ self._selected_disks = self._disk_selection.SelectedDisks
# Update the UI elements.
self._do_refresh(init_expanded_pages=True)
--
2.23.0

View File

@ -0,0 +1,46 @@
From ad48d3ab850c9dd40908a51eae3580fcc148e171 Mon Sep 17 00:00:00 2001
From: xqrustc2020 <69908158+xqrustc2020@users.noreply.github.com>
Date: Tue, 29 Sep 2020 13:16:43 +0800
Subject: [PATCH] fix remove unkown partition in sda failed
fix: cannot create partition when sda exists a ext4 filesystem.
When you clicked the "-" button, only the format on sda should be
destroyed without removing sda from the device tree, but sda
was also destroyed. As a result, sda cannot be found during disk
initialization and an error was reported.
Resolves: rhbz#1878661
---
.../modules/storage/partitioning/interactive/utils.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/modules/storage/partitioning/interactive/utils.py b/pyanaconda/modules/storage/partitioning/interactive/utils.py
index b52876a..fe7bd59 100644
--- a/pyanaconda/modules/storage/partitioning/interactive/utils.py
+++ b/pyanaconda/modules/storage/partitioning/interactive/utils.py
@@ -1046,8 +1046,10 @@ def _destroy_device(storage, device):
:param device: an instance of a device
"""
# Remove the device.
- if device.is_disk and device.partitioned and not device.format.supported:
- storage.recursive_remove(device)
+ if device.is_disk:
+ if device.partitioned and not device.format.supported:
+ storage.recursive_remove(device)
+ storage.initialize_disk(device)
elif device.direct and not device.isleaf:
# We shouldn't call this method for with non-leaf devices
# except for those which are also directly accessible like
@@ -1057,10 +1059,6 @@ def _destroy_device(storage, device):
else:
storage.destroy_device(device)
- # Initialize the disk.
- if device.is_disk:
- storage.initialize_disk(device)
-
# Remove empty extended partitions.
if getattr(device, "is_logical", False):
storage.remove_empty_extended_partitions()
--
2.23.0