Remove deprecated support for add-ons

This commit is contained in:
wk333 2023-08-28 11:32:45 +08:00
parent 931ca4cc9f
commit 33018e2e33
2 changed files with 58 additions and 19 deletions

View File

@ -0,0 +1,50 @@
From 6995fc0923d61bd4d42380a34aefc17e4e94f13a Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Tue, 30 May 2023 09:34:35 +0800
Subject: [PATCH] Remove deprecated support for add-ons
---
initial_setup/__init__.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/initial_setup/__init__.py b/initial_setup/__init__.py
index a418cbe..5273a91 100644
--- a/initial_setup/__init__.py
+++ b/initial_setup/__init__.py
@@ -125,14 +125,14 @@ class InitialSetup(object):
gi.overrides.__path__.insert(0, p)
log.debug("GI overrides imported")
- from pyanaconda.addons import collect_addon_paths
+ from pyanaconda.ui.lib.addons import collect_addon_ui_paths
addon_paths = ["/usr/share/initial-setup/modules", "/usr/share/anaconda/addons"]
# append ADDON_PATHS dirs at the end
sys.path.extend(addon_paths)
- self._addon_module_paths = collect_addon_paths(addon_paths, self.gui_mode_id)
+ self._addon_module_paths = collect_addon_ui_paths(addon_paths, self.gui_mode_id)
log.info("found %d addon modules:", len(self._addon_module_paths))
for addon_path in self._addon_module_paths:
log.debug(addon_path)
@@ -202,7 +202,7 @@ class InitialSetup(object):
commandMap = dict((k, kickstart.commandMap[k]) for k in SUPPORTED_KICKSTART_COMMANDS)
# Prepare new data object
- self.data = kickstart.AnacondaKSHandler(self._addon_module_paths["ks"], commandUpdates=commandMap)
+ self.data = kickstart.AnacondaKSHandler(commandUpdates=commandMap)
kickstart_path = INPUT_KICKSTART_PATH
if os.path.exists(OUTPUT_KICKSTART_PATH):
@@ -329,7 +329,6 @@ class InitialSetup(object):
# Configure all addons
log.info("executing addons")
- self.data.addons.execute(storage=None, ksdata=self.data, users=None, payload=None)
boss_proxy = BOSS.get_proxy()
task_path = boss_proxy.InstallSystemWithTask()
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: initial-setup Name: initial-setup
Version: 0.3.84 Version: 0.3.83
Release: 4 Release: 5
Summary: Initialize system configuration for a newly installed computer Summary: Initialize system configuration for a newly installed computer
License: GPLv2+ License: GPLv2+
URL: https://github.com/rhinstaller/initial-setup URL: https://github.com/rhinstaller/initial-setup
@ -10,6 +10,7 @@ Patch9001: initial-setup-add-support-openeuler.patch
Patch9002: Adapt-to-category-title-translation-fix-in-Anaconda.patch Patch9002: Adapt-to-category-title-translation-fix-in-Anaconda.patch
Patch9003: Add-Packit-support-for-initial-setup.patch Patch9003: Add-Packit-support-for-initial-setup.patch
Patch9004: Make-sure-the-output-from-custom_getpass-is-serializ.patch Patch9004: Make-sure-the-output-from-custom_getpass-is-serializ.patch
Patch9005: Remove-deprecated-support-for-add-ons.patch
%define debug_package %{nil} %define debug_package %{nil}
@ -46,23 +47,6 @@ make test
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%pre
if [ $1 -gt 1 ] ; then
IS_GRAPHICAL_AVAILABLE=0
IS_TEXT_AVAILABLE=0
systemctl is-enabled initial-setup-graphical.service && IS_GRAPHICAL_AVAILABLE=1
systemctl is-enabled initial-setup-text.service && IS_TEXT_AVAILABLE=1
if [ $IS_GRAPHICAL_AVAILABLE -eq 1 ]; then
systemctl stop initial-setup-graphical.service
systemctl disable initial-setup-graphical.service
fi
if [ $IS_TEXT_AVAILABLE -eq 1 ]; then
systemctl stop initial-setup-text.service
systemctl disable initial-setup-text.service
fi
fi
%post %post
%systemd_post %{name}.service %systemd_post %{name}.service
@ -84,6 +68,11 @@ fi
%changelog %changelog
* Mon Aug 28 2023 wangkai <13474090681@163.com> - 0.3.83-5
- Remove deprecated support for add-ons
- Remove old failing pre scriptlet
- Fix rpm version
* Mon Jul 17 2023 shechenglong<shechenglong@xfusion.com> - 0.3.83-4 * Mon Jul 17 2023 shechenglong<shechenglong@xfusion.com> - 0.3.83-4
- Make sure the output from custom_getpass() is serialized after stdout - Make sure the output from custom_getpass() is serialized after stdout