67 lines
3.0 KiB
Diff
67 lines
3.0 KiB
Diff
From de4268203e9872d60dd5a99e0db7346568c2b36e Mon Sep 17 00:00:00 2001
|
|
From: Adam Williamson <awilliam@redhat.com>
|
|
Date: Fri, 24 May 2019 12:01:31 -0700
|
|
Subject: [PATCH] Anaconda addon: setup() and execute() no longer get instclass
|
|
|
|
Since anaconda commit
|
|
https://github.com/rhinstaller/anaconda/commit/78fd1e82 ,
|
|
anaconda addons should no longer expect an install class to be
|
|
passed to their setup() and execute() methods. Without this fix,
|
|
the addon breaks recent versions of anaconda. As the policy
|
|
for this tool seems to be that the most recent version is sent
|
|
to all Fedora releases (and RHEL releases?), I implemented this
|
|
in such a way that it will work with both old and new anaconda.
|
|
|
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1713109
|
|
|
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
|
---
|
|
.../ks/rhsm_ks.py | 18 ++++++++++++++++--
|
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py b/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py
|
|
index 0d5724b0..f7cf8392 100644
|
|
--- a/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py
|
|
+++ b/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py
|
|
@@ -147,21 +147,35 @@ class RHSMAddonData(AddonData):
|
|
def __str__(self):
|
|
return "%%addon %s %s\n%s%%end\n" % (self.name, self.header_args, self.content)
|
|
|
|
- def setup(self, storage, ksdata, instclass, payload):
|
|
+ def setup(self, *args, **kwargs):
|
|
"""Make the changes to the install system.
|
|
|
|
This method is called before the installation
|
|
is started and directly from spokes. It must be possible
|
|
to call it multiple times without breaking the environment."""
|
|
+ # we use the signature we do because anaconda before commit
|
|
+ # 78fd1e82 passes (storage, ksdata, instClass, payload)
|
|
+ # but anaconda after 78fd1e82 passes only
|
|
+ # (storage, ksdata, payload). If this method *did*
|
|
+ # anything we would have to figure out which args we'd got and
|
|
+ # handle them appropriately, but since it does nothing, we
|
|
+ # don't have to bother with that.
|
|
pass
|
|
|
|
- def execute(self, storage, ksdata, instClass, users, payload):
|
|
+ def execute(self, *args, **kwargs):
|
|
|
|
"""Make the changes to the underlying system.
|
|
|
|
This method is called only once in the post-install
|
|
setup phase.
|
|
"""
|
|
+ # we use the signature we do because anaconda before commit
|
|
+ # 78fd1e82 passes (storage, ksdata, instClass, users, payload)
|
|
+ # but anaconda after 78fd1e82 passes only
|
|
+ # (storage, ksdata, users, payload). If this method *did*
|
|
+ # anything we would have to figure out which args we'd got and
|
|
+ # handle them appropriately, but since it does nothing, we
|
|
+ # don't have to bother with that.
|
|
log.debug("Read RHSM ks info, but non gui ks is currently not implemented.")
|
|
|
|
def handle_header(self, lineno, args):
|
|
--
|
|
2.21.0
|
|
|