Skip to content

Commit

Permalink
Fixes #36625 - allow verify checksum for all repo types
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Aug 1, 2023
1 parent 8bbb1ff commit 9d6a04d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/lib/actions/katello/repository/sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9d6a04d

Please sign in to comment.