Sha256: 8a872a0c2c445bd7bf1428c41ddc005055bd1bf3b4dabd291c54f2b62d4fe8f5

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

module Actions
  module Katello
    module Repository
      class CloneYumMetadata < Actions::Base
        def plan(source_repo, target_repo)
          sequence do
            # Check for matching content before indexing happens, the content in pulp is
            # actually updated, but it is not reflected in the database yet.
            output = {}
            if !target_repo.root.previous_changes.include?(:unprotected) &&
                target_repo.environment
              output = plan_action(Katello::Repository::CheckMatchingContent,
                                   :source_repo_id => source_repo.id,
                                   :target_repo_id => target_repo.id).output
            end

            plan_action(Katello::Repository::IndexContent, id: target_repo.id)

            plan_action(Katello::Repository::MetadataGenerate,
                        target_repo,
                        :source_repository => source_repo,
                        :matching_content => output[:matching_content])
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katello-3.10.0 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.10.0.rc1.1 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.10.0.rc1 app/lib/actions/katello/repository/clone_yum_metadata.rb