Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RHELC-1675] Handle failing duplicate package check on EL9 #1363

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions convert2rhel/actions/system_checks/duplicate_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def run(self):
if system_info.version.major == 7 and "name or service not known" in output.lower():
self.duplicate_packages_failure()
return
# For el8 machines we can depend on just the return code being 1 to know the check failed
if system_info.version.major == 8 and ret_code == 1:
# For el8+ machines we can depend on just the return code being 1 to know the check failed
if system_info.version.major >= 8 and ret_code == 1:
self.duplicate_packages_failure()
return
duplicate_packages = filter(None, output.split("\n"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ def duplicate_packages_action():
"package1.x86_64\npackage1.i686\npackage1.s390x\npackage2.x86_64\npackage2.ppc64le\n",
["package1.x86_64", "package1.i686", "package1.s390x", "package2.x86_64", "package2.ppc64le"],
),
(
Version(9, 4),
"package1.x86_64\npackage1.s390x\npackage2.x86_64\npackage2.ppc64le\n",
["package1.x86_64", "package1.s390x", "package2.x86_64", "package2.ppc64le"],
),
(
Version(9, 4),
"package1.x86_64\npackage1.i686\npackage1.s390x\npackage2.x86_64\npackage2.ppc64le\n",
["package1.x86_64", "package1.i686", "package1.s390x", "package2.x86_64", "package2.ppc64le"],
),
),
)
def test_duplicate_packages_error(
Expand Down
Loading