Skip to content

Commit

Permalink
Remove debug messages when comparing c2r versions (#1446)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Diblik <ddiblik@redhat.com>
  • Loading branch information
danmyway authored Dec 6, 2024
1 parent 9826704 commit 940e048
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions convert2rhel/actions/system_checks/convert2rhel_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,13 @@ def run(self):
# This loop will determine the latest available convert2rhel version in the yum repo.
# It assigns the epoch, version, and release ex: ("0", "0.26", "1.el7") to the latest_available_version variable.
for package_version in convert2rhel_versions:
logger.debug("...comparing version {}".format(latest_available_version[1]))
# rpm.labelCompare(pkg1, pkg2) compare two package version strings and return
# -1 if latest_version is greater than package_version, 0 if they are equal, 1 if package_version is greater than latest_version
ver_compare = rpm.labelCompare(
(package_version[1], package_version[2], package_version[3]), latest_available_version
)

if ver_compare > 0:
logger.debug(
"...found {} to be newer than {}, updating".format(package_version[2], latest_available_version[1])
)
latest_available_version = (package_version[1], package_version[2], package_version[3])

logger.debug("Found {} to be latest available version".format(latest_available_version[1]))
Expand Down

0 comments on commit 940e048

Please sign in to comment.