Skip to content

Commit

Permalink
Fix sub-man installation on EL8 (oamg#991)
Browse files Browse the repository at this point in the history
Yumdownloader was downloading two different versions of the
subscription-manager-rhsm-certificates package and convert2rhel failed
when it wanted to install both at the same time.

subscription-manager-rhsm-certificates-1.28.36-3.el8_8.x86_64
subscription-manager-rhsm-certificates-20220623-1.el8.noarch

Pino Toscano from the subscription-manager team told us that the version
20220623 is the latest and the one we should be installing.

Since the two versions have different architecture, this quick solution
is making sure that only the noarch one is downloaded and installed.
  • Loading branch information
bocekm authored Nov 23, 2023
1 parent 7decb7e commit 45cc026
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions convert2rhel/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,15 +833,15 @@ def _relevant_subscription_manager_pkgs():
"python3-syspurpose",
"python3-cloud-what",
"json-c.x86_64", # there's also an i686 version we don't need unless the json-c.i686 is already installed
"subscription-manager-rhsm-certificates",
"subscription-manager-rhsm-certificates.noarch",
]

elif system_info.version.major >= 9:
relevant_pkgs += [
"libdnf-plugin-subscription-manager",
"python3-subscription-manager-rhsm",
"python3-cloud-what",
"subscription-manager-rhsm-certificates.x86_64",
"subscription-manager-rhsm-certificates.noarch",
]

if system_info.is_rpm_installed("json-c.i686"):
Expand Down
6 changes: 3 additions & 3 deletions convert2rhel/unit_tests/subscription_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test__dependencies_to_update_no_pkgs(self, monkeypatch, global_system_info):
frozenset(
(
"subscription-manager",
"subscription-manager-rhsm-certificates",
"subscription-manager-rhsm-certificates.noarch",
"python3-subscription-manager-rhsm",
"dnf-plugin-subscription-manager",
"python3-syspurpose",
Expand All @@ -239,7 +239,7 @@ def test__dependencies_to_update_no_pkgs(self, monkeypatch, global_system_info):
frozenset(
(
"subscription-manager",
"subscription-manager-rhsm-certificates",
"subscription-manager-rhsm-certificates.noarch",
"python3-subscription-manager-rhsm",
"dnf-plugin-subscription-manager",
"python3-syspurpose",
Expand All @@ -255,7 +255,7 @@ def test__dependencies_to_update_no_pkgs(self, monkeypatch, global_system_info):
frozenset(
(
"subscription-manager",
"subscription-manager-rhsm-certificates.x86_64",
"subscription-manager-rhsm-certificates.noarch",
"python3-subscription-manager-rhsm",
"python3-cloud-what",
"libdnf-plugin-subscription-manager",
Expand Down

0 comments on commit 45cc026

Please sign in to comment.