From 9d6a04d58be4f6242db406718b091d3472cbb6b8 Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Mon, 31 Jul 2023 20:31:16 +0000 Subject: [PATCH] Fixes #36625 - allow verify checksum for all repo types --- app/lib/actions/katello/repository/sync.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/lib/actions/katello/repository/sync.rb b/app/lib/actions/katello/repository/sync.rb index dc992a0bb1c..e2a7eb6bf3e 100644 --- a/app/lib/actions/katello/repository/sync.rb +++ b/app/lib/actions/katello/repository/sync.rb @@ -26,7 +26,6 @@ def plan(repo, options = {}) validate_repo!(repo: repo, source_url: source_url, - validate_contents: validate_contents, skip_metadata_check: skip_metadata_check, skip_candlepin_check: options.fetch(:skip_candlepin_check, false)) @@ -81,9 +80,8 @@ def humanized_name end end - def validate_repo!(repo:, source_url:, validate_contents:, skip_metadata_check:, skip_candlepin_check:) + def validate_repo!(repo:, source_url:, skip_metadata_check:, skip_candlepin_check:) fail ::Katello::Errors::InvalidActionOptionError, _("Unable to sync repo. This repository does not have a feed url.") if repo.url.blank? && source_url.blank? - fail ::Katello::Errors::InvalidActionOptionError, _("Cannot validate contents on non-yum/deb repositories.") if validate_contents && !repo.yum? && !repo.deb? fail ::Katello::Errors::InvalidActionOptionError, _("Cannot skip metadata check on non-yum/deb repositories.") if skip_metadata_check && !repo.yum? && !repo.deb? ::Katello::Util::CandlepinRepositoryChecker.check_repository_for_sync!(repo) if repo.yum? && !skip_candlepin_check end