Class: Content::Pulp::RepositoryClone

Inherits:
Repository
  • Object
show all
Defined in:
app/services/content/pulp/repository_clone.rb

Constant Summary collapse

PULP_SELECT_FIELDS =
%w(name epoch version release arch checksumtype checksum)

Instance Method Summary collapse

Instance Method Details

#copy_from(src_repo_id) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/services/content/pulp/repository_clone.rb', line 4

def copy_from(src_repo_id)
  # In order to reduce the memory usage of pulp during the copy process,
  # include the fields that will uniquely identify the rpm. If no fields
  # are listed, pulp will retrieve every field it knows about for the rpm
  # (e.g. changelog, filelist...etc).
  Runcible::Extensions::Rpm.copy(src_repo_id, pulp_id, { :fields => PULP_SELECT_FIELDS })
  Runcible::Extensions::Distribution.copy(src_repo_id, pulp_id)

  # Since the rpms will be copied above, during the copy of errata and package groups,
  # include the copy_children flag to request that pulp skip copying them again.
  Runcible::Extensions::Errata.copy(src_repo_id, pulp_id, { :copy_children => false })
  Runcible::Extensions::PackageGroup.copy(src_repo_id, pulp_id, { :copy_children => false })
  Runcible::Extensions::YumRepoMetadataFile.copy(src_repo_id, pulp_id)
end

#defaultsObject



19
# File 'app/services/content/pulp/repository_clone.rb', line 19

def defaults; end

#pulp_importerObject



21
22
23
# File 'app/services/content/pulp/repository_clone.rb', line 21

def pulp_importer
  Runcible::Extensions::YumImporter.new
end