43 lines
2.2 KiB
Diff
43 lines
2.2 KiB
Diff
From a2f35c0aa4e00936e58c17a94d4f1507a3287c72 Mon Sep 17 00:00:00 2001
|
|
From: Michal Hecko <mhecko@redhat.com>
|
|
Date: Mon, 17 Oct 2022 12:59:22 +0200
|
|
Subject: [PATCH 19/32] rhui(azure-sap-apps): handle EUS SAP Apps content on
|
|
RHEL8+
|
|
|
|
---
|
|
.../common/actors/cloud/checkrhui/actor.py | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/repos/system_upgrade/common/actors/cloud/checkrhui/actor.py b/repos/system_upgrade/common/actors/cloud/checkrhui/actor.py
|
|
index 822c7535..a56bb1e1 100644
|
|
--- a/repos/system_upgrade/common/actors/cloud/checkrhui/actor.py
|
|
+++ b/repos/system_upgrade/common/actors/cloud/checkrhui/actor.py
|
|
@@ -3,6 +3,7 @@ import os
|
|
from leapp import reporting
|
|
from leapp.actors import Actor
|
|
from leapp.libraries.common import rhsm, rhui
|
|
+from leapp.libraries.common.config.version import get_source_major_version
|
|
from leapp.libraries.common.rpms import has_package
|
|
from leapp.libraries.stdlib import api
|
|
from leapp.models import (
|
|
@@ -105,9 +106,15 @@ class CheckRHUI(Actor):
|
|
if info['src_pkg'] != info['target_pkg']:
|
|
self.produce(RpmTransactionTasks(to_install=[info['target_pkg']]))
|
|
self.produce(RpmTransactionTasks(to_remove=[info['src_pkg']]))
|
|
- if provider in ('azure-sap', 'azure-sap-apps'):
|
|
+ # Handle azure SAP systems that use two RHUI clients - one for RHEL content, one for SAP content
|
|
+ if provider == 'azure-sap':
|
|
azure_nonsap_pkg = rhui.RHUI_CLOUD_MAP[upg_path]['azure']['src_pkg']
|
|
self.produce(RpmTransactionTasks(to_remove=[azure_nonsap_pkg]))
|
|
+ elif provider == 'azure-sap-apps':
|
|
+ # SAP Apps systems have EUS content channel from RHEL8+
|
|
+ src_rhel_content_type = 'azure' if get_source_major_version() == '7' else 'azure-eus'
|
|
+ azure_nonsap_pkg = rhui.RHUI_CLOUD_MAP[upg_path][src_rhel_content_type]['src_pkg']
|
|
+ self.produce(RpmTransactionTasks(to_remove=[azure_nonsap_pkg]))
|
|
|
|
self.produce(RHUIInfo(provider=provider))
|
|
self.produce(RequiredTargetUserspacePackages(packages=[info['target_pkg']]))
|
|
--
|
|
2.38.1
|
|
|