Skip to content

Commit

Permalink
fix: Do not upload profile from DNF, when it is disabled in conf
Browse files Browse the repository at this point in the history
* Card ID: CCT-505
* When rhsm.report_package_profile is disabled in rhsm.conf and
  rhsm.package_profile_on_trans is enabled, then profile should
  not be uploaded, because the rhsm.report_package_profile has
  higher priority as it is described in man page of rhsm.conf
  • Loading branch information
jirihnidek committed Jan 15, 2025
1 parent 4da2473 commit 84c1ed8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/dnf/subscription_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ def transaction(self):
Call Package Profile
"""
cfg = config.get_config_parser()
if "1" == cfg.get("rhsm", "package_profile_on_trans"):
if (
cfg.get("rhsm", "report_package_profile") == "1"
and cfg.get("rhsm", "package_profile_on_trans") == "1"
):
log.debug("Uploading package profile")
self._upload_profile()
else:
Expand Down

0 comments on commit 84c1ed8

Please sign in to comment.