leapp-repository/0012-Default-channel-to-GA-is-not-specified-otherwise-120.patch

47 lines
2.0 KiB
Diff
Raw Normal View History

From a4e3906fff5d11e0fb94f5dbe10ed653dc2d0bee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Matu=C5=A1ka?= <mmatuska@redhat.com>
Date: Tue, 23 Apr 2024 23:56:57 +0200
Subject: [PATCH 12/34] Default channel to GA is not specified otherwise
(#1205)
Originally we tried to map by default repositories from particular channels on the source system to their equivalents on the target system. IOW:
* eus -> eus
* aus -> aus
* e4s -> e4s
* "ga" -> "ga"
...
However, it has been revealed this logic should not apply on minor releases for which these non-ga (premium) repositories do not exist. So doing upgrade e.g. to 8.9, 8.10 , 9.3 for which specific eus, etc.. repositories are not defined lead to 404 error.
Discussing this deeply between stakeholders, it has been decided to drop this logic and target always to "ga" repositories unless the leapp is executed with instructions to choose a different channel (using envars, --channel .. option). To prevent this issue.
It's still possible to require mistakenly e.g. "eus" channel for the target release for which the related repositories are not defined. e.g.:
> leapp upgrade --channel eus --target 8.10
In such a case, the previous errors (404 Not found) can be hit again. But it will not happen by default. In this case, we expect and request people to understand what they want when they use the option.
@pirat89 : Updated commit msg
jira: RHEL-24720
---
commands/upgrade/util.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
index b11265ee..9eff0ad1 100644
--- a/commands/upgrade/util.py
+++ b/commands/upgrade/util.py
@@ -207,6 +207,8 @@ def prepare_configuration(args):
if args.channel:
os.environ['LEAPP_TARGET_PRODUCT_CHANNEL'] = args.channel
+ elif 'LEAPP_TARGET_PRODUCT_CHANNEL' not in os.environ:
+ os.environ['LEAPP_TARGET_PRODUCT_CHANNEL'] = 'ga'
if args.iso:
os.environ['LEAPP_TARGET_ISO'] = args.iso
--
2.42.0